A265379 Binary representation of the n-th iteration of the "Rule 158" elementary cellular automaton starting with a single ON (black) cell.
1, 111, 11101, 1110011, 111011101, 11100110011, 1110111011101, 111001100110011, 11101110111011101, 1110011001100110011, 111011101110111011101, 11100110011001100110011, 1110111011101110111011101, 111001100110011001100110011, 11101110111011101110111011101
Offset: 0
Examples
From _Michael De Vlieger_, Dec 09 2015: (Start) First 12 rows: 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 (End)
Links
- Robert Price, Table of n, a(n) for n = 0..499
- Eric Weisstein's World of Mathematics, Rule 158
- Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
- Stephen Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
- Index entries for sequences related to cellular automata
- Index to Elementary Cellular Automata
- Index entries for linear recurrences with constant coefficients, signature (0,10001,0,-10000).
Programs
-
Mathematica
rule = 158; 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([(11100 - (n%2))*100**n//9999 for n in range(30)]) # Karl V. Keller, Jr., Sep 20 2021
Formula
From Colin Barker, Dec 14 2015 and Apr 18 2019: (Start)
a(n) = 10001*a(n-2) - 10000*a(n-4) for n>3.
G.f.: (1+111*x+1100*x^2-100*x^3) / ((1-x)*(1+x)*(1-100*x)*(1+100*x)).
(End)
a(n) = floor((11100 - (n mod 2))*100^n/9999). - Karl V. Keller, Jr., Sep 20 2021