OFFSET
0,2
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
LINKS
Robert Price, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
S. Wolfram, A New Kind of Science
FORMULA
[Incorrect] conjectures from Colin Barker, Jan 16 2016: (Start)
a(n) = 2*a(n-1)+a(n-7)-2*a(n-8) for n>7. [Wrong]
G.f.: (1-x+x^2)*(1+x+x^2) / ((1-x)*(1-2*x)*(1+x+x^2+x^3+x^4+x^5+x^6)). [Wrong]
(End)
The linear recurrence and g.f. are invalid and start to generate erroneous values at a(62). - R. J. Mathar, Apr 12 2019
MAPLE
# Rule 137: value in generation r and column c, where c=0 is the central one
r137 := proc(r::integer, c::integer)
option remember;
local up ;
if r = 0 then
if c = 0 then
1;
else
0;
end if;
else
# previous 3 bits
[procname(r-1, c+1), procname(r-1, c), procname(r-1, c-1)] ;
up := op(3, %)+2*op(2, %)+4*op(1, %) ;
# rule 137 = 10001001_2: 7->1, {6, 5, 4}->0, 3->1, {2, 1}->0, 0->1
if up in {7, 3, 0} then
1;
else
0 ;
end if;
end if;
end proc:
A267515 := proc(n)
b := [seq(r137(r, 0), r=0..n)] ;
add(2^(i-1)*op(-i, b), i=1..nops(b)) ;
end proc:
[seq(A267515(n), n=0..62)] ; # R. J. Mathar, Apr 12 2019
MATHEMATICA
rule=137; rows=20; ca=CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]], {rows-k+1, rows+k-1}], {k, 1, rows}]; (* Truncated list of each row *) mc=Table[catri[[k]][[k]], {k, 1, rows}]; (* Keep only middle cell from each row *) Table[FromDigits[Take[mc, k], 2], {k, 1, rows}] (* Binary Representation of Middle Column *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Price, Jan 16 2016
STATUS
approved