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.

A151737 First differences of A151735 (starting at A151735(2)).

Original entry on oeis.org

1, 2, 1, 5, 1, 5, 5, 11, 1, 5, 5, 11, 7, 15, 19, 23, 1, 5, 5, 11, 7, 15, 19, 23, 7, 15, 21, 29, 29, 49, 59, 47, 1, 5, 5, 11, 7, 15, 19, 23, 7, 15, 21, 29, 29, 49, 59, 47, 7, 15, 21, 29, 29, 49, 61, 53, 29, 51, 71, 87, 107, 157, 163, 95, 1, 5, 5, 11, 7, 15, 19, 23, 7, 15, 21, 29, 29, 49, 59, 47
Offset: 0

Views

Author

N. J. A. Sloane, Jun 15 2009, Jun 16 2009

Keywords

Examples

			If written as a triangle,
1,
2,
1,5,
1,5,5,11,
1,5,5,11,7,15,19,23,
1,5,5,11,7,15,19,23,7,15,21,29,29,49,59,47,
1,5,5,11,7,15,19,23,7,15,21,29,29,49,59,...
the rows approach A151728.
		

Crossrefs

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

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

A151746 G.f.: (1-2*x-5*x^2+4*x^3)/((1-4*x)*(1-x)^2).

Original entry on oeis.org

1, 4, 10, 32, 118, 460, 1826, 7288, 29134, 116516, 466042, 1864144, 7456550, 29826172, 119304658, 477218600, 1908874366, 7635497428, 30541989674, 122167958656, 488671834582, 1954687338284, 7818749353090, 31274997412312, 125099989649198, 500399958596740
Offset: 0

Views

Author

N. J. A. Sloane, Jun 16 2009

Keywords

Crossrefs

Subsequence of A151735 at powers of 2.

Programs

  • Mathematica
    CoefficientList[Series[(1-2x-5x^2+4x^3)/((1-4x)(1-x)^2),{x,0,30}],x] (* Harvey P. Dale, Jan 13 2015 *)

Formula

a(n) = 14/9+2*n/3+4^(n+1)/9, n>0. [From R. J. Mathar, Jun 17 2009]
Showing 1-4 of 4 results.