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.

A240944 Number of compositions of n into square parts k^2 where there are k sorts of part k^2.

Original entry on oeis.org

1, 1, 1, 1, 3, 5, 7, 9, 15, 28, 45, 66, 99, 164, 269, 422, 651, 1028, 1654, 2637, 4149, 6522, 10350, 16467, 26091, 41205, 65174, 103339, 163833, 259361, 410376, 649827, 1029543, 1630725, 2581848, 4087797, 6473832, 10253370, 16237375, 25711316, 40714953, 64478427, 102111230, 161701086, 256062990, 405499697, 642156651
Offset: 0

Views

Author

Joerg Arndt, Aug 04 2014

Keywords

Crossrefs

Cf. A006456 (compositions into squares).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, `if`(n<0, 0,
          add(k*a(n-k^2), k=1..isqrt(n))))
        end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 04 2014
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, If[n<0, 0, Sum[k*a[n-k^2], {k, Sqrt[n]}]]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 29 2021, after Alois P. Heinz *)
  • PARI
    N=66; x='x+O('x^N); Vec(1/(1 - sum(k=1, 1+sqrtint(N), k * x^(k^2))) )

Formula

G.f.: 1/(1 - sum(k>=1, k * x^(k^2)) ).