What sequence is defined by the string below, and more specifically, how is the string generated?
111001100101000010000000000001101
As a bonus, what is the next set of digits in the sequence?
(Hint: There are 21 of them.)
Whenever I think of rabbits in a Sequences context, I think of Fibonacci numbers. Whenever I see a string of 0's and 1's I think of binary numbers. We see here Fibonacci numbers in binary.
The sequence presented starts with F(1) = 1 and F(2) = 1, in binary. Each binary Fibonacci number F(n) is padded with enough leading zeroes to make the length of its representation F(n) digits long.
The following program produces the first 11 individual sets of digits:
DEFDBL AZ
a = 1: b = 1: PRINT "1": PRINT "1"
FOR fibNo = 3 TO 11
c = a + b
a = b: b = c
bn$ = ""
FOR i = 1 TO b
dig = c MOD 2
c = c \ 2
bn$ = LTRIM$(STR$(dig)) + bn$
NEXT
IF c > 0 THEN END
PRINT bn$
NEXT fibNo
1
1
10
011
00101
00001000
0000000001101
000000000000000010101
0000000000000000000000000000100010
0000000000000000000000000000000000000000000000000110111
00000000000000000000000000000000000000000000000000000000000000000000000000000000001011001
So the last one presented in the puzzle is 0000000001101, and the next set, indeed with 21 digits, is 000000000000000010101.
You could even say that the sequence begins with F(0) = 0 presented with zero of its digits.

Posted by Charlie
on 20110907 15:30:43 