BrainDen.com - Brain Teasers
• 0

## Question

don blazys posted an interesting challange over on www.scienceforums.com

thought i'd repost here.

a figurate number is a number such that its value can be arranged into a shape.

ie. the squares, 1 4 9... are figurate numbers. but there are also triangular, pentagonal, hexagonal, etc numbers.

in particular, we are intested in

p(n,r) n>2 r>2 = (n-1)/2 *r^2 -(n-2)/2 *r.

don found that this sequence has a relationship to the physics constants, the fine structure constant and the proton electron ratio.

he wants to find the number of unique terms this equation has less than 10**20.

here is the basic pattern.

```
n\r  3  4  5  6   7

3   6 10 15 21  28

4   9 16 25 36  49

5  12 22 35 51  70

6  15 28 45 66  91

7  18 34 55 82 112

```

as you can see each row initailizes as the previous row plus the row number, and each column increases by the previous row's first value.

the problem in calcuating comes in where many numbers are repeated. in particular row 6 (and every subsquent row divisable by 3) will be unessicary. with row 5, 1/3 of the numbers will be repeated, and with row 7, roughly 1/2 the numbers will be repeated. can you come up with an effiencent algorithm that solves for the number of unique values less than 10**20?

## Recommended Posts

There have been no answers to this question yet

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.