login
A265382
Total number of ON (black) cells after n iterations of the "Rule 158" elementary cellular automaton starting with a single ON (black) cell.
1
1, 4, 8, 13, 20, 27, 37, 46, 59, 70, 86, 99, 118, 133, 155, 172, 197, 216, 244, 265, 296, 319, 353, 378, 415, 442, 482, 511, 554, 585, 631, 664, 713, 748, 800, 837, 892, 931, 989, 1030, 1091, 1134, 1198, 1243, 1310, 1357, 1427, 1476, 1549, 1600, 1676, 1729
OFFSET
0,2
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
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
Cf. A071037.
Sequence in context: A312218 A350304 A368612 * A056738 A170907 A143978
KEYWORD
nonn,easy
AUTHOR
Robert Price, Dec 07 2015
STATUS
approved