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).

This page as a plain text file.
%I A160118 #41 Mar 22 2024 18:44:12
%S A160118 0,1,9,13,41,45,73,85,169,173,201,213,297,309,393,429,681,685,713,725,
%T A160118 809,821,905,941,1193,1205,1289,1325,1577,1613,1865,1973,2729,2733,
%U A160118 2761,2773,2857,2869,2953,2989,3241,3253,3337,3373,3625,3661,3913,4021,4777,4789
%N A160118 Number of "ON" cells at n-th stage in simple 2-dimensional cellular automaton (see Comments for precise definition).
%C A160118 On the infinite square grid, we start at stage 0 with all square cells in the OFF state.
%C A160118 Define a "peninsula cell" to a cell that is connected to the structure by exactly one of its vertices.
%C A160118 At stage 1 we turn ON a single cell in the central position.
%C A160118 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.
%C A160118 For n>1, if n is odd, at stage n we turn ON all the peninsular OFF cells.
%C A160118 For the corresponding corner sequence, see A160796.
%C A160118 An animation will show the fractal-like behavior (cf. A139250).
%C A160118 For the first differences see A160415. - _Omar E. Pol_, Mar 21 2011
%C A160118 First differs from A188343 at a(13). - _Omar E. Pol_, Mar 28 2011
%H A160118 David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.],
%H A160118 N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>.
%H A160118 <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>.
%F A160118 From _Nathaniel Johnston_, Mar 24 2011: (Start)
%F A160118 a(2n-1) = 9 + 4*Sum_{k=2..n} A147610(k) + 28*Sum_{k=2..n-1} A147610(k), n >= 2.
%F A160118 a(2n) = 9 + 4*Sum_{k=2..n} A147610(k) + 28*Sum_{k=2..n} A147610(k), n >= 1.
%F A160118 (End)
%e A160118 If we label the generations of cells turned ON by consecutive numbers we get the cell pattern shown below:
%e A160118 9...............9
%e A160118 .888.888.888.888.
%e A160118 .878.878.878.878.
%e A160118 .8866688.8866688.
%e A160118 ...656.....656...
%e A160118 .8866444.4446688.
%e A160118 .878.434.434.878.
%e A160118 .888.4422244.888.
%e A160118 .......212.......
%e A160118 .888.4422244.888.
%e A160118 .878.434.434.878.
%e A160118 .8866444.4446688.
%e A160118 ...656.....656...
%e A160118 .8866688.8866688.
%e A160118 .878.878.878.878.
%e A160118 .888.888.888.888.
%e A160118 9...............9
%e A160118 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...
%t A160118 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 *)
%Y A160118 Cf. A139250, A139251, A147562, A147610, A160117, A160119, A160379, A160415, A160796, A188343.
%K A160118 nonn
%O A160118 0,3
%A A160118 _Omar E. Pol_, May 05 2009
%E A160118 Entry revised by _Omar E. Pol_ and _N. J. A. Sloane_, Feb 16 2010, Feb 21 2010
%E A160118 a(8) - a(38) from _Nathaniel Johnston_, Nov 06 2010
%E A160118 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
%E A160118 Rule, for n even, edited by _Omar E. Pol_, Mar 22 2011
%E A160118 Incorrect comment (in "formula" section) removed by _Omar E. Pol_, Mar 23 2011, with agreement of author.
%E A160118 More terms from _Amiram Eldar_, Aug 01 2023