A261363 Triangle read by rows: partial row sums of Sierpinski's triangle.
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
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 .
Links
- Reinhard Zumkeller, Rows n = 0..125 of triangle, flattened
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 *)
Comments