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..999
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
FORMULA
Conjectures from Colin Barker, Dec 07 2015 and Apr 18 2019: (Start)
a(n) = 1/16*(10*n^2+2*(-1)^n*n+34*n-3*(-1)^n+19).
a(n) = 1/16*(10*n^2+36*n+16) for n even.
a(n) = 1/16*(10*n^2+32*n+22) for n odd.
a(n) = 2*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) for n>4.
G.f.: (1+3*x+2*x^2-x^3) / ((1-x)^3*(1+x)^2).
(End)
EXAMPLE
From Michael De Vlieger, Dec 09 2015: (Start)
First 12 rows, replacing "0" with "." for better visibility of ON cells, followed by the total number of 1's per row, and the running total up to that row:
1 = 1 -> 1
1 1 1 = 3 -> 4
1 1 1 . 1 = 4 -> 8
1 1 1 . . 1 1 = 5 -> 13
1 1 1 . 1 1 1 . 1 = 7 -> 20
1 1 1 . . 1 1 . . 1 1 = 7 -> 27
1 1 1 . 1 1 1 . 1 1 1 . 1 = 10 -> 37
1 1 1 . . 1 1 . . 1 1 . . 1 1 = 9 -> 46
1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 = 13 -> 59
1 1 1 . . 1 1 . . 1 1 . . 1 1 . . 1 1 = 11 -> 70
1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 = 16 -> 86
1 1 1 . . 1 1 . . 1 1 . . 1 1 . . 1 1 . . 1 1 = 13 -> 99
1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 1 1 . 1 = 19 -> 118
(End)
MATHEMATICA
rule = 158; rows = 30; Table[Total[Take[Table[Total[Table[Take[CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}][[k]], {rows-k+1, rows+k-1}], {k, 1, rows}][[k]]], {k, 1, rows}], k]], {k, 1, rows}]
Accumulate[Count[#, n_ /; n == 1] & /@ CellularAutomaton[158, {{1}, 0}, 51]] (* Michael De Vlieger, Dec 09 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Price, Dec 07 2015
STATUS
approved