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.

Showing 1-4 of 4 results.

A151727 If A151726 is written as a triangle, this is what the rows converge to.

Original entry on oeis.org

4, 20, 20, 44, 28, 60, 76, 92, 28, 60, 84, 116, 116, 196, 236, 188, 28, 60, 84, 116, 116, 196, 244, 212, 116, 204, 284, 348, 428, 628, 652, 380, 28, 60, 84, 116, 116, 196, 244, 212, 116, 204, 284, 348, 428, 628, 660, 404, 116, 204, 284, 348, 428
Offset: 0

Views

Author

N. J. A. Sloane, Jun 14 2009

Keywords

Crossrefs

Cf. A151725, A151726, A151729. Equals 4*A151728.

A151725 Number of ON states after n generations of cellular automaton rule described by the rulestring B1/S012345678.

Original entry on oeis.org

0, 1, 9, 13, 33, 37, 57, 77, 121, 125, 145, 165, 209, 237, 297, 373, 465, 469, 489, 509, 553, 581, 641, 717, 809, 837, 897, 981, 1097, 1213, 1409, 1645, 1833, 1837, 1857, 1877, 1921, 1949, 2009, 2085, 2177, 2205, 2265, 2349, 2465, 2581, 2777, 3013
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Jun 13 2009

Keywords

Comments

A cell is turned ON if exactly one of its eight neighbors is ON. An ON cell remains ON forever.
We start with a single ON cell.
Analog of A147562, which is the case when each cell has only four neighbors.
The equivalent Mathematica cellular automaton is obtained with neighborhood weights {{1,1,1},{1,9,1},{1,1,1}}, rule number 261634, and starting configuration {{1}}. [John W. Layman, Sep 11 2009]
Observation: Visual pattern similar to the toothpick structure (see A139250). [Omar E. Pol, Dec 14 2009]

Crossrefs

See A151731, A151732, A151733, A151734 for the same CA except that two neighbors must be ON for a cell to turn ON.

Programs

  • Mathematica
    RasterGraphics[state_?MatrixQ, colors_Integer : 2, opts___] := Graphics[Raster[ Reverse[1 - state/(colors - 1)]], AspectRatio -> (AspectRatio /. {opts} /. AspectRatio -> Automatic), Frame -> True, FrameTicks -> None, GridLines -> None]; wt = {{1,1,1}, {1,9,1}, {1,1,1}}; rule= 261634; init={{1}}; Show[GraphicsArray[Map[RasterGraphics, CellularAutomaton[{rule, {2, wt}, {1, 1}}, {init, 0}, 9, -10]]]];nx = 100; ca = CellularAutomaton[{rule, {2, wt}, {1, 1}}, {init, 0}, nx - 1, -nx]; a = Table[Total[ca[[i]], 2], {i, 1, nx}] (* John W. Layman, Sep 11 2009 *)
    A151725[0] = 0; A151725[n_] := Total[CellularAutomaton[{174766, {2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}}, {1, 1}}, {{{1}}, 0}, {{{n - 1}}}], 2]; Array[A151725, 48, 0] (* JungHwan Min, Sep 01 2016 *)
    A151725L[n_] := Prepend[Total[#, 2] & /@ CellularAutomaton[{174766, {2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}}, {1, 1}}, {{{1}}, 0}, n - 1], 0]; A151725L[47] (* JungHwan Min, Sep 01 2016 *)

Formula

For a recurrence see the Applegate-Pol-Sloane paper.

Extensions

Definition clarified by SiYang Hu, May 10 2025

A151731 Number of ON states after n generations of cellular automaton based on square grid with each cell adjacent to its eight neighbors.

Original entry on oeis.org

0, 2, 6, 14, 20, 32, 40, 54, 70, 94, 108, 128, 152, 172, 188, 224, 256, 300, 344, 380, 416, 464, 504, 552, 598, 658, 728, 772, 816, 880, 940, 1000, 1076, 1148, 1212, 1276, 1360, 1454, 1556, 1624, 1708, 1796, 1912, 2004, 2124, 2250, 2376, 2480
Offset: 0

Views

Author

N. J. A. Sloane, Jun 15 2009

Keywords

Comments

A cell is turned ON if exactly two of its eight neighbors is ON. An ON cell remains ON forever.
We start with two edge-adjacent ON cells.

Crossrefs

See A151725, A151726 for the same CA except that exactly one neighbor must be ON for a cell to turn ON.

Programs

  • PARI
    \\ See Links section.

A151747 Except for boundary cases (n <= 3, j = 0, 1, 2^i-1), satisfies a(n) = a(2^i+j) = 2 a(j) + a(j+1), where n = 2^i + j, 0 <= j < 2^i .

Original entry on oeis.org

0, 1, 3, 5, 8, 9, 11, 17, 21, 15, 11, 18, 25, 29, 39, 54, 53, 27, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 160, 129, 51, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 448, 305, 99, 11, 18
Offset: 0

Views

Author

David Applegate, Jun 16 2009

Keywords

Comments

The boundary cases are covered by the following formulas:
a(n) = 2n-1 if n<=3.
a(n) = 1+(3*i+1)*2^(i-2) if j=0.
a(n) = 3+ 3*2^(i-1) if j= 1.
a(n) = 2*a(j)+a(j+1)-1 if j=2^i-1.

Examples

			If written as a triangle:
.0,
.1,
.3, 5,
.8, 9, 11, 17,
.21, 15, 11, 18, 25, 29, 39, 54,
.53, 27, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 160,
.129, 51, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 448,
.305, 99, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 449, 309, 113, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 425, 455, 331, 170, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1076, 1296, 1200,
.705, 195, 11, 18, 25, 29, 39, 55, 57, 41, 40, 61, 79, 97, 132, 161, 133, 65, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 424, 449, 309, 113, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 425, 455, 331, 170, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1076, 1296, 1201, 709, 209, 40, 61, 79, 97, 133, 167, 155, 122, 141, 201, 255, 326, 425, 455, 331, 170, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1076, 1297, 1207, 731, 266, 141, 201, 255, 327, 433, 489, 432, 385, 483, 657, 836, 1077, 1305, 1241, 832, 481, 483, 657, 837, 1087, 1355, 1410, 1249, 1253, 1623, ...
then the rows (omitting the first two terms of each row) converge to A151748.
		

Crossrefs

The first column gives A170881.

Programs

  • Maple
    A151747 := proc(n) option remember; local i, j;
    if (n <= 0) then
      0;
    elif (n <= 3) then
      2*n-1;
    else
       i := floor(log(n)/log(2));
       j := n - 2^i;
       if (j = 0) then (3*i+1)*2^(i-2)+1;
       elif (j = 1) then 3*2^(i-1)+3;
       elif (j = 2^i-1) then 2*procname(j)+procname(j+1)-1;
       else 2*procname(j)+procname(j+1);
       end if;
    end if;
    end proc;
  • Mathematica
    a[n_] := a[n] = Module[{i, j}, Which[n <= 0, 0, n <= 3, 2n-1, True, i = Floor[Log2[n]]; j = n-2^i; Which[j == 0, (3i+1)*2^(i-2)+1, j == 1, 3*2^(i-1)+3, j == 2^i-1, 2a[j] + a[j+1] - 1,True, 2a[j] + a[j+1]]]];
    Table[a[n], {n, 0, 67}] (* Jean-François Alcover, Aug 04 2022, from Maple code *)
Showing 1-4 of 4 results.