cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A160118 Number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton (see Comments for precise definition).

Original entry on oeis.org

0, 1, 9, 13, 41, 45, 73, 85, 169, 173, 201, 213, 297, 309, 393, 429, 681, 685, 713, 725, 809, 821, 905, 941, 1193, 1205, 1289, 1325, 1577, 1613, 1865, 1973, 2729, 2733, 2761, 2773, 2857, 2869, 2953, 2989, 3241, 3253, 3337, 3373, 3625, 3661, 3913, 4021, 4777, 4789
Offset: 0

Views

Author

Omar E. Pol, May 05 2009

Keywords

Comments

On the infinite square grid, we start at stage 0 with all square cells in the OFF state.
Define a "peninsula cell" to a cell that is connected to the structure by exactly one of its vertices.
At stage 1 we turn ON a single cell in the central position.
For n>1, if n is even, at stage n we turn ON all the OFF neighboring cells from cells that were turned in ON at stage n-1.
For n>1, if n is odd, at stage n we turn ON all the peninsular OFF cells.
For the corresponding corner sequence, see A160796.
An animation will show the fractal-like behavior (cf. A139250).
For the first differences see A160415. - Omar E. Pol, Mar 21 2011
First differs from A188343 at a(13). - Omar E. Pol, Mar 28 2011

Examples

			If we label the generations of cells turned ON by consecutive numbers we get the cell pattern shown below:
9...............9
.888.888.888.888.
.878.878.878.878.
.8866688.8866688.
...656.....656...
.8866444.4446688.
.878.434.434.878.
.888.4422244.888.
.......212.......
.888.4422244.888.
.878.434.434.878.
.8866444.4446688.
...656.....656...
.8866688.8866688.
.878.878.878.878.
.888.888.888.888.
9...............9
In the first generation, only the central "1" is ON, a(1)=1. In the next generation, we turn ON eight "2" around the central cell, leading to a(2)=a(1)+8=9. In the third generation, four "3" are turned ON at the vertices of the square, a(3)=a(2)+4=13. And so on...
		

Crossrefs

Programs

  • Mathematica
    With[{d = 2}, wt[n_] := DigitCount[n, 2, 1]; a[n_] := If[OddQ[n], 3^d + (2^d)*Sum[(2^d - 1)^(wt[k] - 1), {k, 1, (n - 1)/2}] + (2^d)*(3^d - 2)*Sum[(2^d - 1)^(wt[k] - 1), {k, 1, (n - 3)/2}], 3^d + (2^d)*Sum[(2^d - 1)^(wt[k] - 1), {k, 1, n/2 - 1}] + (2^d)*(3^d - 2)*Sum[(2^d - 1)^(wt[k] - 1), {k, 1, n/2 - 1}]]; a[0] = 0; a[1] = 1; Array[a, 50, 0]] (* Amiram Eldar, Aug 01 2023 *)

Formula

From Nathaniel Johnston, Mar 24 2011: (Start)
a(2n-1) = 9 + 4*Sum_{k=2..n} A147610(k) + 28*Sum_{k=2..n-1} A147610(k), n >= 2.
a(2n) = 9 + 4*Sum_{k=2..n} A147610(k) + 28*Sum_{k=2..n} A147610(k), n >= 1.
(End)

Extensions

Entry revised by Omar E. Pol and N. J. A. Sloane, Feb 16 2010, Feb 21 2010
a(8) - a(38) from Nathaniel Johnston, Nov 06 2010
a(13) corrected at the suggestion of Sean A. Irvine. Then I corrected 19 terms between a(14) and a(38). Finally I added a(39)-a(42). - Omar E. Pol, Mar 21 2011
Rule, for n even, edited by Omar E. Pol, Mar 22 2011
Incorrect comment (in "formula" section) removed by Omar E. Pol, Mar 23 2011, with agreement of author.
More terms from Amiram Eldar, Aug 01 2023