A299032
Number of ordered ways of writing n-th triangular number as a sum of n squares of positive integers.
Original entry on oeis.org
1, 1, 0, 3, 6, 0, 12, 106, 420, 2718, 18240, 120879, 694320, 5430438, 40668264, 300401818, 2369504386, 19928714475, 174151735920, 1543284732218, 14224347438876, 135649243229688, 1331658133954940, 13369350846412794, 138122850643702056, 1462610254141337590
Offset: 0
a(4) = 6 because fourth triangular number is 10 and we have [4, 4, 1, 1], [4, 1, 4, 1], [4, 1, 1, 4], [1, 4, 4, 1], [1, 4, 1, 4] and [1, 1, 4, 4].
Cf.
A000217,
A000290,
A066535,
A072964,
A104383,
A126683,
A196010,
A224677,
A224679,
A278340,
A288126,
A298330,
A298858,
A298939,
A299031.
-
b:= proc(n, t) option remember; local i; if n=0 then
`if`(t=0, 1, 0) elif t<1 then 0 else 0;
for i while i^2<=n do %+b(n-i^2, t-1) od; % fi
end:
a:= n-> b(n*(n+1)/2, n):
seq(a(n), n=0..25); # Alois P. Heinz, Feb 05 2018
-
Table[SeriesCoefficient[(-1 + EllipticTheta[3, 0, x])^n/2^n, {x, 0, n (n + 1)/2}], {n, 0, 25}]
A299031
Number of ordered ways of writing n-th triangular number as a sum of n squares of nonnegative integers.
Original entry on oeis.org
1, 1, 0, 3, 18, 60, 252, 1576, 10494, 64152, 458400, 3407019, 27713928, 225193982, 1980444648, 17626414158, 165796077562, 1593587604441, 15985672426992, 163422639872978, 1729188245991060, 18743981599820280, 208963405365941380, 2378065667103672024, 27742569814633730608
Offset: 0
a(3) = 3 because third triangular number is 6 and we have [4, 1, 1], [1, 4, 1] and [1, 1, 4].
Cf.
A000217,
A000290,
A066535,
A072964,
A104383,
A126683,
A196010,
A224677,
A224679,
A278340,
A288126,
A298329,
A298858,
A298938,
A299032.
-
Table[SeriesCoefficient[(1 + EllipticTheta[3, 0, x])^n/2^n, {x, 0, n (n + 1)/2}], {n, 0, 24}]
A331900
Number of compositions (ordered partitions) of the n-th triangular number into distinct triangular numbers.
Original entry on oeis.org
1, 1, 1, 1, 7, 1, 3, 13, 3, 55, 201, 159, 865, 1803, 7093, 43431, 14253, 22903, 130851, 120763, 1099693, 4527293, 4976767, 7516897, 14349685, 72866239, 81946383, 167841291, 897853735, 455799253, 946267825, 5054280915, 3941268001, 17066300985, 49111862599
Offset: 0
a(6) = 3 because we have [21], [15, 6] and [6, 15].
-
b:= proc(n, i, p) option remember; (t->
`if`(t*(i+2)/3n, 0, b(n-t, i-1, p+1)))))((i*(i+1)/2))
end:
a:= n-> b(n*(n+1)/2, n, 0):
seq(a(n), n=0..37); # Alois P. Heinz, Jan 31 2020
-
b[n_, i_, p_] := b[n, i, p] = With[{t = i(i+1)/2}, If[t(i+2)/3 < n, 0, If[n == 0, p!, b[n, i-1, p] + If[t > n, 0, b[n-t, i-1, p+1]]]]];
a[n_] := b[n(n+1)/2, n, 0];
a /@ Range[0, 37] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
Showing 1-3 of 3 results.