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.

A261363 Triangle read by rows: partial row sums of Sierpinski's triangle.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 3, 4, 1, 1, 1, 1, 2, 1, 2, 2, 2, 3, 4, 1, 1, 2, 2, 3, 3, 4, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 4, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 4, 1, 2, 3, 4, 4, 4, 4, 4, 5, 6, 7, 8, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 16 2015

Keywords

Comments

T(n,n) = number of distinct terms in row n = number of odd terms in row n+1 = A001316(n).
Central terms, for n > 0: T(2*n,n) = A048896(n-1).

Examples

			.   n |  Sierpinski: A047999(n,*)  |  Partial row sums: T(n,*)
. ----+----------------------------+----------------------------
.   0 |              1             |              1
.   1 |             1 1            |             1 2
.   2 |            1 0 1           |            1 1 2
.   3 |           1 1 1 1          |           1 2 3 4
.   4 |          1 0 0 0 1         |          1 1 1 1 2
.   5 |         1 1 0 0 1 1        |         1 2 2 2 3 4
.   6 |        1 0 1 0 1 0 1       |        1 1 2 2 3 3 4
.   7 |       1 1 1 1 1 1 1 1      |       1 2 3 4 5 6 7 8
.   8 |      1 0 0 0 0 0 0 0 1     |      1 1 1 1 1 1 1 1 2
.   9 |     1 1 0 0 0 0 0 0 1 1    |     1 2 2 2 2 2 2 2 3 4
.  10 |    1 0 1 0 0 0 0 0 1 0 1   |    1 1 2 2 2 2 2 2 3 3 4
.  11 |   1 1 1 1 0 0 0 0 1 1 1 1  |   1 2 3 4 4 4 4 4 5 6 7 8
.  12 |  1 0 0 0 1 0 0 0 1 0 0 0 1 |  1 1 1 1 2 2 2 2 3 3 3 3 4  .
		

Crossrefs

Cf. A047999, A008949, A048896 (central terms), A001316 (right edge), A261366.

Programs

  • Haskell
    a261363 n k = a261363_tabl !! n !! k
    a261363_row n = a261363_tabl !! n
    a261363_tabl = map (scanl1 (+)) a047999_tabl
  • Mathematica
    row[n_] := Accumulate[Array[Boole[0 == BitAnd[n-#, #]] &, n + 1, 0]]; Array[row, 13, 0] // Flatten (* Amiram Eldar, May 13 2025 *)