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.

A089053 Triangle read by rows: T(n,k) (n >= 1, 1 <= k <= n) = number of partitions of n into exactly k powers of 2.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 1, 0, 1, 2, 2, 2, 2, 2, 1, 1, 1, 0, 0, 1, 2, 2, 2, 2, 2, 1, 1, 1, 0, 1, 2, 2, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 1, 2, 2, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 1, 3, 3, 3, 4, 3, 2, 2, 2, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 03 2003

Keywords

Crossrefs

See A089052, which is the main entry for this triangle.

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = Which[k > n, 0, k == 0, If[n == 0, 1, 0], Mod[n, 2] == 1, T[n - 1, k - 1], True, T[n - 1, k - 1] + T[n/2, k]];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)