A339419 Number of compositions (ordered partitions) of n into an odd number of squares.
0, 1, 0, 1, 1, 1, 3, 1, 5, 5, 7, 14, 10, 27, 27, 44, 69, 73, 144, 158, 260, 366, 466, 775, 940, 1490, 2031, 2803, 4264, 5551, 8460, 11525, 16399, 23864, 32435, 47981, 66005, 94701, 135072, 187999, 272678, 379095, 543626, 769490, 1083788, 1553661, 2177681, 3113333
Offset: 0
Keywords
Examples
a(9) = 5 because we have [9], [4, 4, 1], [4, 1, 4], [1, 4, 4] and [1, 1, 1, 1, 1, 1, 1, 1, 1].
Links
Programs
-
Maple
b:= proc(n, t) option remember; local r, f, g; if n=0 then t else r, f, g:=$0..2; while f<=n do r, f, g:= r+b(n-f, 1-t), f+2*g-1, g+1 od; r fi end: a:= n-> b(n, 0): seq(a(n), n=0..50); # Alois P. Heinz, Dec 03 2020
-
Mathematica
nmax = 47; CoefficientList[Series[1/(3 - EllipticTheta[3, 0, x]) - 1/(1 + EllipticTheta[3, 0, x]), {x, 0, nmax}], x]