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.

A334169 a(n) is the number of ON-cells in the n-th full level of ON-cells of a triangular wedge in the hexagonal grid of A151723 (after 2^k >= n generations have been computed).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 14, 16, 18, 26, 30, 32, 34, 50, 58, 62, 64, 66, 98, 114, 122, 126, 128, 130, 194, 226, 242, 250, 254, 256, 258, 386, 450, 482, 498, 506, 510, 512, 514, 770, 898, 962, 994, 1010, 1018, 1022, 1024, 1026, 1538, 1794, 1922, 1986, 2018, 2034, 2042, 2046, 2048, 2050, 3074, 3586, 3842
Offset: 0

Views

Author

Hartmut F. W. Hoft, Apr 17 2020

Keywords

Comments

a(n) also is the distance of the full level of ON-cells from the apex of the triangular wedge. Note that 7 is the last generation modifying level 6 and, more generally for example, generation 2^m + 2^(m-1) + 1 is the last generation modifying level 2^m + 2, for m >= 1:
Level Generation ON-cells
1 1 1
2 2 1 1
3 3 1 0 1
4 4 1 1 1 1
5 5 1 0 0 0 1
6 7 1 1 1 1 1 1
7 7 1 0 1 0 1 0 1
8 8 1 1 1 1 1 1 1 1
9 9 1 0 0 0 0 0 0 0 1
10 13 1 1 1 1 1 1 1 1 1 1
...

Examples

			The sequence is the triangle below read by rows, where each row contains m-1 full levels of ON-cells from level 2^(m-1) + 2 through level 2^m, for m >= 2:
m\j   0    1    2    3    4    5    6    7    8
0:    1
1:    2
2:    4
3:    6    8
4:   10   14   16
5:   18   26   30   32
6:   34   50   58   62   64
7:   66   98  114  122  126  128
8:  130  194  226  242  250  254  256
9:  258  386  450  482  498  506  510  512
10: 514  770  898  962  994 1010 1018 1022 1024
...
A formula for the m-1 elements in positions (m, j), 0 <= j <= m-2, in each row m >= 2 is: b(m, j) = 2 + Sum_{k=0..j} 2^(m-k-1).
		

Crossrefs

Cf. A151723.

Programs

  • Mathematica
    triangleRow[m_] := Map[2+Sum[2^(m-k-1), {k, 0, #}]&, Range[0, m-2]]/;m>=2
    triangleRow[10] (* last line in triangle in Comments section *)
    a334169[0]=1; a334169[1]=2; a334169[n_] := Module[{k, j}, k=Floor[(3 + Sqrt[1 + 8(n-2)])/2]; j = n - 2 - (k-2)(k-1)/2; 2 + Sum[2^(k-i-1), {i, 0, j}]]/;n>=2
    Map[a334169,Range[0,66]] (* sequence data *)

Formula

a(0) = 1; a(1) = 2, a(n) = 2 + Sum_{i=0..j} 2^(k-i-1), where k = floor((3 + sqrt(1 + 8*(n-2)))/2) and j = n - 2 - (k-2)*(k-1)/2 for n >= 2.