A266175 Binary representation of the n-th iteration of the "Rule 5" elementary cellular automaton starting with a single ON (black) cell.
1, 10, 100, 1101011, 10000, 11110101111, 1000000, 111111010111111, 100000000, 1111111101011111111, 10000000000, 11111111110101111111111, 1000000000000, 111111111111010111111111111, 100000000000000, 1111111111111101011111111111111, 10000000000000000
Offset: 0
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
- S. Wolfram, A New Kind of Science
- Index entries for sequences related to cellular automata
- Index to Elementary Cellular Automata
- Index entries for linear recurrences with constant coefficients, signature (0,10101,0,-1010100,0,1000000).
Programs
-
Magma
I:=[1,10,100,1101011,10000,11110101111]; [n le 6 select I[n] else 10101*Self(n-2)-1010100*Self(n-4)+1000000*Self(n-6): n in [1..30]]; // Vincenzo Librandi, Dec 24 2015
-
Mathematica
rule = 5; rows = 20; Table[FromDigits[Table[Take[CellularAutomaton[rule,{{1},0}, rows-1, {All,All}][[k]], {rows-k+1, rows+k-1}], {k,1,rows}][[k]]], {k,1,rows}]
-
Python
print([10*100**n//9 - 101*10**(n-1) if n%2 else 10**n for n in range(30)]) # Karl V. Keller, Jr., Jun 29 2021
Formula
From Colin Barker, Dec 23 2015 and Apr 13 2019: (Start)
a(n) = 10101*a(n-2) - 1010100*a(n-4) + 1000000*a(n-6) for n>5.
G.f.: (1+10*x-10001*x^2+1000001*x^3+10000*x^4-1110000*x^5) / ((1-x)*(1+x)*(1-10*x)*(1+10*x)*(1-100*x)*(1+100*x)).
(End)
a(n) = floor(10*100^n/9) - 101*10^(n-1) for odd n; a(n) = 10^n = A011557(n) for even n. - Karl V. Keller, Jr., Jun 29 2021