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.

A359251 Sum of terms in an odd-even expansion of n.

Original entry on oeis.org

2, 3, 10, 11, 14, 15, 32, 33, 36, 37, 60, 61, 64, 65, 110, 111, 114, 115, 124, 125, 128, 129, 176, 177, 180, 181, 234, 235, 238, 239, 342, 343, 346, 347, 356, 357, 360, 361, 380, 381, 384, 385, 470, 471, 474, 475, 578, 579, 582, 583, 592, 593, 596, 597, 622, 623, 626, 627, 792, 793, 796, 797
Offset: 2

Views

Author

Moosa Nasir, Dec 22 2022

Keywords

Comments

n stands alone in the first row, and then each row expands to a new row as follows.
An even number 2b >= 2 or an odd number 2c+1 >= 3 expands into cells below, below left, and below right, as follows:
even odd
2b 2c+1
b 0 b c 1 c
When expansions overlap, the values add together in the new cells.
Any 0 or 1 does not expand and expansions end when a row of only 0's and 1's is reached.
This last row is 1,1,1 when n=3 and otherwise always 1,0,1.
a(n) is the sum of all cells in all rows, excluding the starting n itself.

Examples

			For n = 4:
      4       initial row
    2 0 2
  1 0 2 0 1
    1 0 1     last row
  a(4) = (2+2) + (1+2+1) + (1+1).
For n = 8:
        8
      4 0 4
    2 0 4 0 2
  1 0 3 0 3 0 1
    1 1 2 1 1
      1 0 1
  a(8) = (4+4) + (2+4+2) + (1+3+3+1) + (1+1+2+1+1) + (1+1) = 32.