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-15 of 15 results.

A295559 Same as A161645 except that triangles must always grow outwards.

Original entry on oeis.org

0, 1, 3, 6, 6, 6, 12, 18, 12, 6, 12, 18, 18, 18, 30, 42, 24, 6, 12, 18, 18, 18, 30, 42, 30, 18, 30, 42, 42, 42, 66, 90, 48, 6, 12, 18, 18, 18, 30, 42, 30, 18, 30, 42, 42, 42, 66, 90, 54, 18, 30, 42, 42, 42, 66, 90, 66, 42, 66, 90, 90, 90, 138, 186, 96, 6, 12
Offset: 0

Views

Author

N. J. A. Sloane, Nov 27 2017

Keywords

Comments

Note that Reed's version has errors (see A295558).

References

  • R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6. [Describes the dual structure where new triangles are joined at vertices rather than edges.]

Crossrefs

Programs

  • PARI
    \\ Empirically discovered algorithm.
    AVal(k)=6*(2^(k+1)-1)
    BVal(k, kk)={ local v; v = 3 * 2^k; for (j=0,kk-1,v += 6 * 2^j);v}
    A295559(n)={ local (len,zeros,ones,r);
    if(n==0, return(0));
    if(n==1, return(1));
    if(n==2, return(3));
    n++; len=length(binary(n));
    zeros=ones=0; i=bittest(n,0);  \\ Skip trailing 1
    while(bittest(n,i)==0,zeros++;i++);
    for(j=i+1,len-2,ones+=bittest(n,j));
    if (bittest(n,0)==1,
    if (len==zeros+2, r=BVal(1, zeros-1), if (zeros==0, r=BVal(ones+1, ones+1), r=BVal(ones+2, ones+zeros))),
    if (len==zeros+1, r=AVal(zeros-2), r=AVal(ones+zeros-1)));
    r;}
    vector(200,i,A295559(i-1))
    \\ Lars Blomberg, Dec 20 2017

Formula

From Lars Blomberg, Dec 20 2017: (Start)
Empirically (correct to 3*10^6 terms):
Convert n+1 to binary and view it as 1a1b or 1a1b1,
where a is zero or more digits, let "ones" be the number of 1's in a,
and b is zero or more 0's, let "zeros" be the number of 0's.
Let "len" be the total number of binary digits.
Then r=A295559(n) is determined by ones, zeros, len, and the parity of n+1, as follows:
if (n==0,1,2) r=0,1,3
else if (n+1 is odd)
if (len==zeros+2) r=BVal(1, zeros-1) else if (zeros==0) r=BVal(ones+1, ones+1) else r=BVal(ones+2, ones+zeros)
else
if (len==zeros+1) r=AVal(zeros-2) else r=AVal(ones+zeros-1)
and
AVal(k)=6*(2^(k+1)-1)
BVal(k, kk)=3*2^k + sum(j=0,kk-1, 6 * 2^j) (End)

Extensions

Terms a(18) and beyond from Lars Blomberg, Dec 20 2017

A253770 Number of ON states after n generations of cellular automaton based on triangles, with diamonds.

Original entry on oeis.org

0, 6, 24, 42, 96, 114, 168, 222, 348, 402, 456, 510, 636, 726, 852, 1014, 1320, 1482, 1536, 1590, 1716, 1806, 1932, 2094, 2400, 2598, 2724, 2886, 3192, 3498, 3840, 4254, 4956, 5442, 5568, 5622, 5748, 5838, 5964, 6126, 6432, 6630, 6756, 6918, 7224, 7530, 7872, 8286
Offset: 0

Views

Author

Omar E. Pol, Jan 11 2015

Keywords

Comments

Also 6 times the Y-toothpicks sequence A160120.
Explanation: consider the Y-toothpick structure of A160120, then replace every Y-toothpick with six ON cells forming a star with three rhombuses (or diamonds) that share only one vertex. Every diamond contains two triangular cells that share one edge.
The rules are the essentially the same as A160120.
An ON cell remains ON forever.
The sequence gives the number of triangular ON cells after the n-th stage.
A253771 (the first differences) give the number of triangular cells turned "ON" at the n-th stage.
A160120 (the Y-toothpick sequence) gives the number of stars in the structure after the n-th stage.
A160121 gives the number of stars added at the n-th stage.
A160167 gives the number of diamonds in the structure after the n-th stage.

Examples

			After one generation, the cellular automaton looks like a star or a flower with three petals as shown below:
.
.        /\
.       _\/_
.      /_/\_\
.
There are one star, three diamonds and six ON cells, so a(1) = 6.
		

Crossrefs

Formula

a(n) = 6*A160120(n) = 3*A160157(n) = 2*A160167(n).

A256256 Total number of ON cells after n generations of cellular automaton on triangular grid, starting from a node, in which every 60-degree wedge looks like the Sierpiński's triangle.

Original entry on oeis.org

0, 6, 18, 30, 54, 66, 90, 114, 162, 174, 198, 222, 270, 294, 342, 390, 486, 498, 522, 546, 594, 618, 666, 714, 810, 834, 882, 930, 1026, 1074, 1170, 1266, 1458, 1470, 1494, 1518, 1566, 1590, 1638, 1686, 1782, 1806, 1854, 1902, 1998, 2046, 2142, 2238, 2430, 2454, 2502, 2550, 2646, 2694, 2790, 2886, 3078, 3126, 3222, 3318, 3510, 3606, 3798, 3990, 4374
Offset: 0

Views

Author

Omar E. Pol, Mar 20 2015

Keywords

Comments

Analog of A160720, but here we are working on the triangular lattice.
The first differences (A256257) gives the number of triangular cells turned ON at every generation.
Also 6 times the sum of all entries in rows 0 to n of Sierpiński's triangle A047999.
Also 6 times the total number of odd entries in first n rows of Pascal's triangle A007318, see formula section.
The structure contains three distinct kinds of polygons formed by triangular ON cells: the initial hexagon, rhombuses (each one formed by two ON cells) and unit triangles.
Note that if n is a power of 2 greater than 2, the structure looks like concentric hexagons with triangular holes, where some of them form concentric stars.

Examples

			On the infinite triangular grid we start with all triangular cells turned OFF, so a(0) = 0.
At stage 1, in the structure there are six triangular cells turned ON forming a regular hexagon, so a(1) = 6.
At stage 2, there are 12 new triangular ON cells forming six rhombuses around the initial hexagon, so a(2) = 6 + 12 = 18.
And so on.
		

Crossrefs

Programs

  • Mathematica
    Prepend[6*FoldList[Plus, 0, Total /@ CellularAutomaton[90, Join[Table[0, {#}], {1}, Table[0, {#}]], #]][[2 ;; -1]], 0] &[63] (* Michael De Vlieger, Nov 03 2022, after Bradley Klee at A006046 *)
  • PARI
    a(n) = 6*sum(j=0, n, sum(k=0, j, binomial(j, k) % 2)); \\ Michel Marcus, Apr 01 2015

Formula

a(n) = 6*A006046(n).

A256266 Total number of ON states after n generations of cellular automaton based on triangles (see Comments lines for definition).

Original entry on oeis.org

0, 6, 18, 24, 48, 66, 78, 84, 132, 174, 210, 240, 264, 282, 294, 300, 396, 486, 570, 648, 720, 786, 846, 900, 948, 990, 1026, 1056, 1080, 1098, 1110, 1116, 1308, 1494, 1674, 1848, 2016, 2178, 2334, 2484, 2628, 2766, 2898, 3024, 3144, 3258, 3366, 3468, 3564, 3654, 3738, 3816, 3888, 3954, 4014, 4068, 4116, 4158, 4194, 4224, 4248
Offset: 0

Views

Author

Omar E. Pol, Mar 20 2015

Keywords

Comments

On the infinite triangular grid we start at stage 0 with a hexagon formed by six OFF cells, so a(0) = 0.
At stage 1, around the mentioned hexagon, six triangular cells connected by their vertices are turned ON forming a six-pointed star, so a(1) = 6.
We use the same rules as A255748 for every one of the six 60-degree wedges of the structure.
If n is a power of 2 minus 1 and n is greater than 2, then the structure looks like concentric six-pointed stars.
If n is a power of 2 and n is greater than 2, then the structure looks like a hexagon that contains concentric six-pointed stars.
Note that in every wedge the structure seems to grow into the holes of a virtual Sierpiński's triangle (see example).

Examples

			Illustration of the structure after 15 generations:
(Note that every circle should be replaced with a triangle.)
.
.                            O
.                           O O
.                          O O O
.                         O O O O
.                        O O O O O
.                       O O O O O O
.                      O O O O O O O
.                     O O O O O O O O
.    O O O O O O O O \       O       / O O O O O O O O
.     O O O O O O O   \     O O     /   O O O O O O O
.      O O O O O O     \   O O O   /     O O O O O O
.       O O O O O       \ O O O O /       O O O O O
.        O O O O O O O O \   O   / O O O O O O O O
.         O O O   O O O   \ O O /   O O O   O O O
.          O O     O O O O \ O / O O O O     O O
.           O       O   O O \ / O O   O       O
.            - - - - - - - -   - - - - - - - -
.           O       O   O O / \ O O   O       O
.          O O     O O O O / O \ O O O O     O O
.         O O O   O O O   / O O \   O O O   O O O
.        O O O O O O O O /   O   \ O O O O O O O O
.       O O O O O       / O O O O \       O O O O O
.      O O O O O O     /   O O O   \     O O O O O O
.     O O O O O O O   /     O O     \   O O O O O O O
.    O O O O O O O O /       O       \ O O O O O O O O
.                     O O O O O O O O
.                      O O O O O O O
.                       O O O O O O
.                        O O O O O
.                         O O O O
.                          O O O
.                           O O
.                            O
.
There are 300 ON cells, so a(15) = 300.
		

Crossrefs

Programs

  • Mathematica
    6*Join[{0}, Accumulate@ Flatten@ Table[Range[2^n, 1, -1], {n, 0, 5}]] (* Michael De Vlieger, Nov 03 2022 *)

Formula

a(n) = 6 * A255748(n), n >= 1.

A342271 A161645(n)/3.

Original entry on oeis.org

1, 2, 2, 2, 4, 6, 4, 2, 4, 8, 10, 8, 10, 14, 8, 2, 4, 8, 10, 10, 14, 22, 22, 12, 10, 20, 28, 24, 26, 32, 16, 2, 4, 8, 10, 10, 14, 22, 22, 14, 14, 26, 38, 38, 38, 50, 46, 20, 10, 20, 28, 30, 38, 58, 66, 44, 30, 48, 70, 64, 64, 70, 32, 2, 4, 8
Offset: 2

Views

Author

N. J. A. Sloane, Mar 11 2021

Keywords

References

  • S. Ulam, On some mathematical problems connected with patterns of growth of figures, pp. 215-224 of R. E. Bellman, ed., Mathematical Problems in the Biological Sciences, Proc. Sympos. Applied Math., Vol. 14, Amer. Math. Soc., 1962. See Example 3.

Crossrefs

Previous Showing 11-15 of 15 results.