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.

Previous Showing 11-20 of 21 results. Next

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

Original entry on oeis.org

0, 1, 9, 21, 49, 61, 97, 157, 225, 237, 273, 333, 417, 525, 657, 813, 961, 973, 1009, 1069, 1153, 1261, 1393, 1549, 1729, 1933, 2161, 2413, 2689, 2989, 3313, 3661, 3969, 3981, 4017, 4077, 4161, 4269, 4401, 4557, 4737, 4941, 5169, 5421, 5697, 5997, 6321, 6669, 7041, 7437, 7857, 8301, 8769, 9261, 9777, 10317, 10881, 11469
Offset: 0

Views

Author

Omar E. Pol, Apr 21 2015

Keywords

Comments

On the infinite square grid at stage 0 there are no ON cells, so a(0) = 0.
At stage 1, only one cell is turned ON, so a(1) = 1.
If n is a power of 2 so the structure is a square of side length 2n - 1 that contains (2n-1)^2 ON cells.
The structure grows by the four corners as square waves forming layers of ON cells up the next square structure, and so on (see example).
Note that a(24) = 1729 is also the Hardy-Ramanujan number (see A001235).
Has the same rules as A256534 but here a(1) = 1 not 4.
Has a smoother behavior than A160414 with which shares infinitely many terms (see example).
A256531, the first differences, gives the number of cells turned ON at n-th stage.

Examples

			With the positive terms written as an irregular triangle in which the row lengths are the terms of A011782 the sequence begins:
1;
9;
21,    49;
61,    97,  157,  225;
237,  273,  333,  417,  525,  657,  813,  961;
...
Right border gives A060867.
This triangle T(n,k) shares with the triangle A160414 the terms of the column k, if k is a power of 2, for example both triangles share the following terms: 1, 9, 21, 49, 61, 97, 225, 237, 273, 417, 961, etc.
.
Illustration of initial terms, for n = 1..10:
.       _ _ _ _                       _ _ _ _
.      |  _ _  |                     |  _ _  |
.      | |  _|_|_ _ _ _ _ _ _ _ _ _ _|_|_  | |
.      | |_|  _ _ _ _ _ _   _ _ _ _ _ _  |_| |
.      |_ _| |  _ _ _ _  | |  _ _ _ _  | |_ _|
.          | | |  _ _  | | | |  _ _  | | |
.          | | | |  _|_|_|_|_|_|_  | | | |
.          | | | |_|  _ _   _ _  |_| | | |
.          | | |_ _| |  _|_|_  | |_ _| | |
.          | |_ _ _| |_|  _  |_| |_ _ _| |
.          |  _ _ _|  _| |_| |_  |_ _ _  |
.          | |  _ _| | |_ _ _| | |_ _  | |
.          | | |  _| |_ _| |_ _| |_  | | |
.          | | | | |_ _ _ _ _ _ _| | | | |
.          | | | |_ _| | | | | |_ _| | | |
.       _ _| | |_ _ _ _| | | |_ _ _ _| | |_ _
.      |  _| |_ _ _ _ _ _| |_ _ _ _ _ _| |_  |
.      | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
.      | |_ _| |                     | |_ _| |
.      |_ _ _ _|                     |_ _ _ _|
.
After 10 generations there are 273 ON cells, so a(10) = 273.
		

Crossrefs

Programs

  • Mathematica
    With[{z=7},Join[{0},Flatten[Array[(2^#-1)^2+12Range[0,2^(#-1)-1]^2&,z]]]] (* Generates 2^z terms *) (* Paolo Xausa, Nov 15 2023, after Omar E. Pol *)

Formula

For i = 1 to z: for j = 0 to 2^(i-1)-1: n = n+1: a(n) = (2^i-1)^2 + 3*(2*j)^2: next j: next i

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

Original entry on oeis.org

0, 4, 16, 28, 64, 76, 112, 172, 256, 268, 304, 364, 448, 556, 688, 844, 1024, 1036, 1072, 1132, 1216, 1324, 1456, 1612, 1792, 1996, 2224, 2476, 2752, 3052, 3376, 3724, 4096, 4108, 4144, 4204, 4288, 4396, 4528, 4684, 4864, 5068, 5296, 5548, 5824, 6124, 6448, 6796, 7168, 7564, 7984, 8428, 8896, 9388, 9904, 10444, 11008
Offset: 0

Views

Author

Omar E. Pol, Apr 22 2015

Keywords

Comments

On the infinite square grid at stage 0 there are no ON cells, so a(0) = 0.
At stage 1, four cells are turned ON forming a square, so a(1) = 4.
If n is a power of 2 so the structure is a square of side length 2n that contains (2n)^2 ON cells.
The structure grows by the four corners as square waves forming layers of ON cells up the next square structure, and so on (see example).
Has the same rules as A256530 but here a(1) = 4 not 1.
Has a smoother behavior than A160410 with which shares infinitely many terms (see example).
A261695, the first differences, gives the number of cells turned ON at n-th stage.

Examples

			With the positive terms written as an irregular triangle in which the row lengths are the terms of A011782 the sequence begins:
4;
16;
28,     64;
76,    112,  172,  256;
268,   304,  364,  448,  556,  688,  844, 1024;
...
Right border gives the elements of A000302 greater than 1.
This triangle T(n,k) shares with the triangle A160410 the terms of the column k, if k is a power of 2, for example, both triangles share the following terms: 4, 16, 28, 64, 76, 112, 256, 268, 304, 448, 1024, etc.
.
Illustration of initial terms, for n = 1..10:
.       _ _ _ _                         _ _ _ _
.      |  _ _  |                       |  _ _  |
.      | |  _|_|_ _ _ _ _ _ _ _ _ _ _ _|_|_  | |
.      | |_|  _ _ _ _ _ _     _ _ _ _ _ _  |_| |
.      |_ _| |  _ _ _ _  |   |  _ _ _ _  | |_ _|
.          | | |  _ _  | |   | |  _ _  | | |
.          | | | |  _|_|_|_ _|_|_|_  | | | |
.          | | | |_|  _ _     _ _  |_| | | |
.          | | |_ _| |  _|_ _|_  | |_ _| | |
.          | |_ _ _| |_|  _ _  |_| |_ _ _| |
.          |       |   | |   | |   |       |
.          |  _ _ _|  _| |_ _| |_  |_ _ _  |
.          | |  _ _| | |_ _ _ _| | |_ _  | |
.          | | |  _| |_ _|   |_ _| |_  | | |
.          | | | | |_ _ _ _ _ _ _ _| | | | |
.          | | | |_ _| | |   | | |_ _| | | |
.       _ _| | |_ _ _ _| |   | |_ _ _ _| | |_ _
.      |  _| |_ _ _ _ _ _|   |_ _ _ _ _ _| |_  |
.      | | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _| | |
.      | |_ _| |                       | |_ _| |
.      |_ _ _ _|                       |_ _ _ _|
.
After 10 generations there are 304 ON cells, so a(10) = 304.
		

Crossrefs

Programs

  • Mathematica
    {0}~Join~Flatten@ Table[4^i + 3 (2 j)^2, {i, 6}, {j, 0, 2^(i - 1) - 1}] (* Michael De Vlieger, Nov 03 2022 *)

Formula

For i = 1 to z: for j = 0 to 2^(i-1)-1: n = n+1: a(n) = 4^i + 3*(2*j)^2: next j: next i
It appears that a(n) = 4 * A236305(n-1), n >= 1.

A164982 Number of ON cells after n generations of the 2D cellular automaton described in the comments.

Original entry on oeis.org

1, 3, 4, 12, 7, 21, 16, 40, 22, 42, 34, 67, 52, 85, 70, 125, 94, 126, 102, 150, 118, 172, 177, 234, 209, 240, 238, 319, 285, 363, 378, 458, 383, 444, 404, 493, 474, 520, 529, 628, 583, 602, 622, 727, 664, 816, 835, 948, 873, 926, 952, 1065, 1010, 1090, 1187
Offset: 1

Views

Author

John W. Layman, Sep 03 2009

Keywords

Comments

The cells are the squares of the standard square grid. All cells are initially OFF and one cell is turned ON at generation 1. At subsequent generations a cell is ON if and only if (1) exactly one of neighbors NW, NE, and S was ON, or (2) all three of cells N, SW, and SE were ON in the previous generation. (The 9-cell Moore neighborhood is labeled {{NW,N,NE},{W,C,E},{SW,S,SE}}).

Crossrefs

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];
    rule=61986;
    Show[GraphicsArray[Map[RasterGraphics, CellularAutomaton[{rule, {2, {{1, 4, 1}, {0, 0, 0}, {4, 1, 4}}}, {1, 1}}, {{{1}}, 0}, 4, -5]]]];
    ca = CellularAutomaton[{rule, {2, {{1, 4, 1}, {0, 0, 0}, {4, 1, 4}}}, {1, 1}}, {{{1}}, 0}, 99, -100];
    Table[Total[ca[[i]], 2], {i, 1, 100}]

A160416 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, 8, 11, 32, 39, 80, 89, 146, 159
Offset: 0

Views

Author

Omar E. Pol, May 20 2009, Jun 14 2009

Keywords

Examples

			If we label the generations of cells turned ON by consecutive numbers we get the cell pattern shown below:
..9...9...9...9...9
...888.888.888.888.
...878.878.878.878.
...886668666866688.
..9..656.656.656..9
...886644464446688.
...878.434.434.878.
...886644222446688.
..9..656.212.656..9
000000000022446688.
0000000000.434.878.
000000000064446688.
000000000056.656..9
000000000066866688.
0000000000.878.878.
0000000000.888.888.
00000000009...9...9
0000000000.........
0000000000.........
		

Crossrefs

A162349 First differences of A160412.

Original entry on oeis.org

3, 9, 9, 27, 9, 27, 27, 81, 9, 27, 27, 81, 27, 81, 81, 243, 9, 27, 27, 81, 27, 81, 81, 243, 27, 81, 81, 243, 81, 243, 243, 729, 9, 27, 27, 81, 27, 81, 81, 243, 27, 81, 81, 243, 81, 243, 243, 729, 27, 81, 81, 243, 81, 243, 243, 729, 81, 243, 243, 729, 243, 729
Offset: 1

Views

Author

Omar E. Pol, Jul 14 2009

Keywords

Comments

Note that if A048883 is written as a triangle then rows converge to this sequence. - Omar E. Pol, Nov 15 2009

Crossrefs

Programs

  • Mathematica
    a[n_] := 3^(1 + DigitCount[n - 1, 2, 1]); Array[a, 100] (* Amiram Eldar, Feb 02 2024 *)

Formula

a(n) = 3^A063787(n) = 3 * A048883(n-1). - Amiram Eldar, Feb 02 2024

Extensions

More terms from Omar E. Pol, Nov 15 2009
More terms from Colin Barker, Apr 19 2015
More terms from Amiram Eldar, Feb 02 2024

A183126 Toothpick sequence with toothpicks connected by their endpoints.

Original entry on oeis.org

0, 1, 7, 23, 39, 79, 95, 135, 175, 287, 303, 343, 383, 495, 535, 647, 759, 1087, 1103, 1143, 1183, 1295, 1335, 1447, 1559, 1887, 1927, 2039, 2151, 2479, 2591, 2919, 3247, 4223, 4239, 4279, 4319, 4431, 4471, 4583, 4695
Offset: 0

Views

Author

Omar E. Pol, Mar 28 2011

Keywords

Comments

On the infinite square grid we start with no toothpicks.
At stage 1 we place a single toothpick of length 1.
Rule: each exposed endpoint of the toothpicks of the old generation must be touched by the endpoints of three toothpicks of new generation.
The sequence gives the number of toothpicks after n stages. A183127 gives the number of toothpicks added at the n-th stage.

Crossrefs

Programs

  • Mathematica
    a[n_] := 7 + 4 (n - 2 + Sum[3^DigitCount[k, 2, 1], {k, n - 2}]); a[0] = 0; a[1] = 1; Array[a, 41, 0] (* Michael De Vlieger, Nov 02 2022 *)

Formula

From Nathaniel Johnston, Apr 06 2011: (Start)
a(n) = 7 + 4*(n-2 + Sum_{k=1..n-2}3^A000120(k)), n >= 2.
a(n) = 7 + 4*(n-2 + 3*A151920(n-3)), n >= 3.
a(1 + 2^n) = 2^(n+2)+4^(n+1)-1, n >= 0.
(End)

Extensions

Terms a(0)-a(10) confirmed and terms a(11)-a(35) added by John W. Layman, Mar 30 2011
a(36)-a(40) from Nathaniel Johnston, Apr 06 2011

A161343 a(n) = 7^A000120(n).

Original entry on oeis.org

1, 7, 7, 49, 7, 49, 49, 343, 7, 49, 49, 343, 49, 343, 343, 2401, 7, 49, 49, 343, 49, 343, 343, 2401, 49, 343, 343, 2401, 343, 2401, 2401, 16807, 7, 49, 49, 343, 49, 343, 343, 2401, 49, 343, 343, 2401, 343, 2401, 2401, 16807, 49, 343, 343, 2401, 343, 2401, 2401, 16807, 343, 2401, 2401, 16807, 2401, 16807, 16807, 117649
Offset: 0

Views

Author

Omar E. Pol, Jun 14 2009

Keywords

Comments

Also first differences of A161342.
From Omar E. Pol, May 03 2015: (Start)
It appears that when A151785 is regarded as a triangle in which the row lengths are the powers of 2, this is what the rows converge to.
Also this is also a row of the square array A256140.
(End)

Examples

			From _Omar E. Pol_, May 03 2015: (Start)
Also, written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
7;
7, 49;
7, 49, 49, 343;
7, 49, 49, 343, 49, 343, 343, 2401;
7, 49, 49, 343, 49, 343, 343, 2401, 49, 343, 343, 2401, 343, 2401, 2401, 16807;
...
Row sums give A055274.
Right border gives A000420.
(End)
		

Crossrefs

Programs

  • PARI
    a(n) = 7^hammingweight(n); \\ Omar E. Pol, May 03 2015

Formula

a(n) = A000420(A000120(n)). - Omar E. Pol, May 03 2015
G.f.: Product_{k>=0} (1 + 7*x^(2^k)). - Ilya Gutkovskiy, Mar 02 2017

Extensions

More terms from Sean A. Irvine, Mar 08 2011
New name from Omar E. Pol, May 03 2015
a(52)-a(63) from Omar E. Pol, May 16 2015

A165345 Number of ON cells after n generations of the 2D cellular automaton described in the comments.

Original entry on oeis.org

1, 5, 9, 25, 29, 41, 53, 105, 113, 129, 141, 193, 205, 241, 285, 433, 453, 481, 497, 553, 569, 609, 653, 801, 829, 881, 917, 1073, 1109, 1217, 1349, 1793, 1845, 1905, 1933, 2001, 2029, 2081, 2129, 2281, 2313, 2369, 2409, 2569, 2609, 2721, 2853, 3297, 3357
Offset: 1

Views

Author

John W. Layman, Sep 15 2009, Sep 16 2009

Keywords

Comments

The cells are the squares of the standard square grid. All cells are initially OFF and one cell is turned ON at generation 1. At subsequent generations a cell is ON if and only if (1) it was ON, or (2) exactly one of the four nearest side neighbors was ON, or (3) exactly three of the four nearest corner neighbors were ON, in the previous generation
The equivalent Mathematica automaton is obtained with neighborhood weights {{10,2,10},{2,1,2},{10,2,10}}, rule number 755364134566574, and initial configuration {{1}} (see code).

Crossrefs

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 = {{10, 2, 10}, {2, 1, 2}, {10, 2, 10}}; rule=755364134566574; init = {{1}}; Show[GraphicsArray[ Map[RasterGraphics, CellularAutomaton[{rule, {2, wt}, {1, 1}}, {init, 0}, 9, -10]]]]; ca = CellularAutomaton[{rule, {2, wt}, {1, 1}}, {init, 0}, 99, -100]; a = Table[Total[ca[[i]], 2], {i, 1, 100}]

A160807 a(n) = A160799(n)/4.

Original entry on oeis.org

0, 1, 5, 12, 28, 47, 75, 112, 176, 243, 319, 404, 516, 637, 785, 960, 1216, 1475, 1743, 2020, 2324, 2637, 2977, 3344, 3792, 4249, 4733, 5244, 5836, 6455, 7155, 7936, 8960, 9987, 11023, 12068, 13140, 14221, 15329, 16464, 17680, 18905, 20157
Offset: 1

Views

Author

Omar E. Pol, Jun 14 2009

Keywords

Crossrefs

Essentially partial sums of A130665.

Programs

Formula

G.f.: x^2*Product_{i>=0} p(x^(2^i)) where p(x) = 1 + 5*x + 7*x^2 + 3*x^3. - Gary W. Adamson, Aug 25 2016 [edited by Jason Yuen, Oct 06 2024]

Extensions

More terms from Max Alekseyev, Dec 12 2011

A171170 Corner sequence (starting each round in the first quadrant).

Original entry on oeis.org

1, 2, 3, 4, 4, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 1, 4, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 1, 3, 4, 1, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4, 3, 4, 1, 2, 3, 4, 3, 4, 1, 4, 1, 2, 4, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 1, 3, 4, 1, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 4, 3, 4, 1, 2, 3
Offset: 1

Views

Author

Omar E. Pol, Dec 04 2009

Keywords

Comments

See A161411, which is the main entry for this sequence.
See also A171171 for another version.

Examples

			================
.......41.......
.......32.......
================
......4141......
......3..2......
......4..1......
......3232......
================
.....41..41.....
.....3....2.....
................
................
.....4....1.....
.....32..32.....
================
....41414141....
....3..23..2....
....4......1....
....32....32....
....41....41....
....3......2....
....4..14..1....
....32323232....
================
...41......41...
...3........2...
................
................
................
................
................
................
................
...4........1...
...32......32...
================
And so on.
Triangle begins:
1,2,3,4;
4,1,2, 1,2,3, 2,3,4, 3,4,1;
4,1,2, 1,2,3, 2,3,4, 3,4,1;
3,4,1,4,1,2,1,2,3, 4,1,2,1,2,3,2,3,4, 1,2,3,2,3,4,3,4,1, 2,3,4,3,4,1,4,1,2;
4,1,2, 1,2,3, 2,3,4, 3,4,1;
3,4,1,4,1,2,1,2,3, 4,1,2,1,2,3,2,3,4, 1,2,3,2,3,4,3,4,1, 2,3,4,3,4,1,4,1,2;
Contribution from _Omar E. Pol_, Dec 09 2009: (Start)
Illustration for n = 1..148
================
.41..41..41..41.
.341412..341412.
..3412....3412..
..434141414121..
.43234123412321.
.32.43414121.32.
....32341232....
....41432141....
.41.34323212.41.
.34143214321412.
..343232323212..
..4321....4321..
.432321..432321.
.32..32..32..32.
================
(End)
		

Crossrefs

Previous Showing 11-20 of 21 results. Next