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”).

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

%I #51 Feb 07 2021 07:04:26

%S 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,

%T 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,

%U 0,3,0,10,0,0,8,0,0,1,0,0,0,1,4,0,15,0,0,9,0,0,1

%N Number T(n,k) of compositions of n into k nonzero squares; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

%H Alois P. Heinz, <a href="/A337165/b337165.txt">Rows n = 0..350, flattened</a>

%F G.f. of column k: (Sum_{j>=1} x^(j^2))^k.

%F Sum_{k=0..n} k * T(n,k) = A281704(n).

%F Sum_{k=0..n} (-1)^k * T(n,k) = A317665(n).

%e Triangle T(n,k) begins:

%e 1;

%e 0, 1;

%e 0, 0, 1;

%e 0, 0, 0, 1;

%e 0, 1, 0, 0, 1;

%e 0, 0, 2, 0, 0, 1;

%e 0, 0, 0, 3, 0, 0, 1;

%e 0, 0, 0, 0, 4, 0, 0, 1;

%e 0, 0, 1, 0, 0, 5, 0, 0, 1;

%e 0, 1, 0, 3, 0, 0, 6, 0, 0, 1;

%e 0, 0, 2, 0, 6, 0, 0, 7, 0, 0, 1;

%e 0, 0, 0, 3, 0, 10, 0, 0, 8, 0, 0, 1;

%e 0, 0, 0, 1, 4, 0, 15, 0, 0, 9, 0, 0, 1;

%e ...

%p b:= proc(n) option remember; `if`(n=0, 1, add((s->

%p `if`(s>n, 0, expand(x*b(n-s))))(j^2), j=1..isqrt(n)))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):

%p seq(T(n), n=0..14);

%t b[n_] := b[n] = If[n == 0, 1, Sum[With[{s = j^2},

%t If[s>n, 0, Expand[x*b[n - s]]]], {j, 1, Sqrt[n]}]];

%t T[n_] := CoefficientList[b[n], x];

%t T /@ Range[0, 14] // Flatten (* _Jean-François Alcover_, Feb 07 2021, after _Alois P. Heinz_ *)

%Y Columns k=0-10 give: A000007, A010052, A063725, A063691, A063730, A340481, A340905, A340906, A340915, A340946, A340947.

%Y Row sums give A006456.

%Y T(2n,n) gives A338464.

%Y Main diagonal gives A000012.

%Y Cf. A000290, A281704, A317665, A341040.

%K nonn,tabl

%O 0,18

%A _Alois P. Heinz_, Feb 03 2021