login
Decimal representation of the n-th iteration of the "Rule 3" elementary cellular automaton starting with a single ON (black) cell.
3

%I #39 Aug 25 2021 19:39:25

%S 1,4,2,121,4,2035,8,32743,16,524239,32,8388511,64,134217535,128,

%T 2147483263,256,34359737599,512,549755812351,1024,8796093019135,2048,

%U 140737488349183,4096,2251799813672959,8192,36028797018939391,16384,576460752303374335,32768

%N Decimal representation of the n-th iteration of the "Rule 3" elementary cellular automaton starting with a single ON (black) cell.

%C Rule 35 also generates this sequence.

%D S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

%H Robert Price, <a href="/A266069/b266069.txt">Table of n, a(n) for n = 0..999</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ElementaryCellularAutomaton.html">Elementary Cellular Automaton</a>

%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>

%H <a href="https://oeis.org/wiki/Index_to_Elementary_Cellular_Automata">Index to Elementary Cellular Automata</a>

%F 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

%F 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

%e From _Michael De Vlieger_, Dec 21 2015: (Start)

%e First 8 rows, replacing leading zeros with ".", the row converted to its binary, then decimal equivalent at right:

%e 1 = 1 -> 1

%e 1 0 0 = 100 -> 4

%e . . . 1 0 = 10 -> 2

%e 1 1 1 1 0 0 1 = 1111001 -> 121

%e . . . . . . 1 0 0 = 100 -> 4

%e 1 1 1 1 1 1 1 0 0 1 1 = 11111110011 -> 2035

%e . . . . . . . . . 1 0 0 0 = 1000 -> 8

%e 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 = 111111111100111 -> 32743

%e (End)

%t 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}]

%o (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

%Y Cf. A263428, A266068, A266070, A266071, A081253, A266072, A247375, A266073, A266074.

%K nonn,easy

%O 0,2

%A _Robert Price_, Dec 20 2015