login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A337165
Number T(n,k) of compositions of n into k nonzero squares; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
25
1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 0, 4, 0, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 1, 0, 1, 0, 3, 0, 0, 6, 0, 0, 1, 0, 0, 2, 0, 6, 0, 0, 7, 0, 0, 1, 0, 0, 0, 3, 0, 10, 0, 0, 8, 0, 0, 1, 0, 0, 0, 1, 4, 0, 15, 0, 0, 9, 0, 0, 1
OFFSET
0,18
LINKS
FORMULA
G.f. of column k: (Sum_{j>=1} x^(j^2))^k.
Sum_{k=0..n} k * T(n,k) = A281704(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A317665(n).
EXAMPLE
Triangle T(n,k) begins:
1;
0, 1;
0, 0, 1;
0, 0, 0, 1;
0, 1, 0, 0, 1;
0, 0, 2, 0, 0, 1;
0, 0, 0, 3, 0, 0, 1;
0, 0, 0, 0, 4, 0, 0, 1;
0, 0, 1, 0, 0, 5, 0, 0, 1;
0, 1, 0, 3, 0, 0, 6, 0, 0, 1;
0, 0, 2, 0, 6, 0, 0, 7, 0, 0, 1;
0, 0, 0, 3, 0, 10, 0, 0, 8, 0, 0, 1;
0, 0, 0, 1, 4, 0, 15, 0, 0, 9, 0, 0, 1;
...
MAPLE
b:= proc(n) option remember; `if`(n=0, 1, add((s->
`if`(s>n, 0, expand(x*b(n-s))))(j^2), j=1..isqrt(n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
seq(T(n), n=0..14);
MATHEMATICA
b[n_] := b[n] = If[n == 0, 1, Sum[With[{s = j^2},
If[s>n, 0, Expand[x*b[n - s]]]], {j, 1, Sqrt[n]}]];
T[n_] := CoefficientList[b[n], x];
T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Feb 07 2021, after Alois P. Heinz *)
CROSSREFS
Row sums give A006456.
T(2n,n) gives A338464.
Main diagonal gives A000012.
Sequence in context: A186715 A331983 A219485 * A057918 A242192 A016380
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Feb 03 2021
STATUS
approved