OFFSET
0,2
COMMENTS
Rule 35 also generates this sequence.
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
LINKS
Robert Price, Table of n, a(n) for n = 0..999
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
FORMULA
G.f.: (1+4*x-17*x^2+45*x^3+16*x^4-64*x^5) / ((1-x)*(1+x)*(1-4*x)*(1+4*x)*(1-2*x^2)). - Colin Barker, Dec 21 2015 and Apr 18 2019
a(n) = 2*4^n - 3*2^((n-1)/2) - 1 for odd n; a(n) = 2^(n/2) for even n. - Karl V. Keller, Jr., Aug 25 2021
EXAMPLE
From Michael De Vlieger, Dec 21 2015: (Start)
First 8 rows, replacing leading zeros with ".", the row converted to its binary, then decimal equivalent at right:
1 = 1 -> 1
1 0 0 = 100 -> 4
. . . 1 0 = 10 -> 2
1 1 1 1 0 0 1 = 1111001 -> 121
. . . . . . 1 0 0 = 100 -> 4
1 1 1 1 1 1 1 0 0 1 1 = 11111110011 -> 2035
. . . . . . . . . 1 0 0 0 = 1000 -> 8
1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 = 111111111100111 -> 32743
(End)
MATHEMATICA
rule = 3; rows = 30; Table[FromDigits[Table[Take[CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}][[k]], {rows-k+1, rows+k-1}], {k, 1, rows}][[k]], 2], {k, 1, rows}]
PROG
(Python) print([2*4**n - 3*2**((n-1)//2) - 1 if n%2 else 2**(n//2) for n in range(30)]) # Karl V. Keller, Jr., Aug 25 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Price, Dec 20 2015
STATUS
approved