Friday, July 18, 2008

Find the next row. Win $25

Each row below is produced by a definite rule. What is the next row and what is the rule? $25 Prize to the first person who posts the answer in the comments or emails me at [s m a n g a n o [at] i n t o - t e c h n o l o g y [dot] c o m].


3
4
5
5,3
6,4
7
7,4,1
7,5,1
8,3
8,6
8,6,3
9,4
9,5,3
9,6,1
9,7
9,7,5,1
10,4,1
10,5,1
10,6,4,1
10,7,4
10,7,5
10,8,4
10,8,5,3
11
11,6
11,6,4,1
11,7,1
11,7,5
11,7,5,3
11,8,4
11,9,4,1
11,9,6
11,9,7,1
11,9,7,4
12,5
12,5,3
12,7
12,7,5,1
12,8,3
12,8,6
12,9,1
12,9,4
12,9,7
12,9,7,3
12,9,7,5,1
12,10
12,10,6,4,1
12,10,8,4
12,10,8,5,3
12,10,8,6,1
13
13,5,1
13,6
13,7,5
13,8,4
13,8,6,1
13,9,3
13,9,4,1
13,9,6,3
13,9,7,1
13,9,7,4
13,10,5
13,10,7,5,1
13,10,8,3
13,10,8,4,1
13,10,8,6
13,11,6,1
13,11,7,3
13,11,8,4,1
13,11,8,5,1
13,11,8,6,3
13,11,9,4
13,11,9,6,4
13,11,9,7,4,1
14,3
14,5,1
14,6,4,1
14,7,5,3
14,8,4
14,8,6,4
14,9,6
14,9,6,3
14,9,7,5,3
14,10,1
14,10,5,3
14,10,6,4
14,10,7,4,1
14,10,8,4,1
14,10,8,6
14,10,8,6,3
14,11,1
14,11,7
14,11,8
14,11,8,4,1
14,11,8,6,4,1
14,11,9,4
14,11,9,6,1
14,12
14,12,3
14,12,7,5,3

3 comments:

misof said...

Those are canonical representations of primes in Fibonacci base. If I'm not mistaken, the next prime is 547 = 377 + 144 + 21 + 5 = "14,12,8,5"

Sal Mangano said...

And we have a winner! Nice. Mail me you address or paypal to claim yor prize.

Sal Mangano said...

Here is the Matheimatica code that will convert an integer into a list of fibonacci offsets.

fiboEncode1[n_Integer] := Module[{b, n2 = n, sqrt5 = Sqrt[5], fibo},
Reap [While[n2 > 0,
b = Floor[Log[GoldenRatio, n2*sqrt5]];
fibo = Fibonacci[b];
fibo = If[n2 >= fibo, fibo, Fibonacci[--b]];
Sow[b]; n2 = n2 - fibo;]]]
fiboEncode[n_Integer] := fiboEncode1[n][[2, 1]]

I think the most interesting part of this is how you find the fibonacci number that is closest to an ineger by using Log in the base of the golden ratio (1/2 (Sqrt[5]+1))