A339418 Number of compositions (ordered partitions) of n into an even number of squares.
1, 0, 1, 0, 1, 2, 1, 4, 2, 6, 9, 8, 20, 16, 35, 44, 55, 102, 105, 196, 242, 344, 540, 652, 1084, 1380, 2037, 2964, 3912, 6042, 7976, 11776, 16634, 22968, 33963, 46156, 67457, 94510, 133180, 192316, 266514, 385338, 540138, 767008, 1094576, 1534704, 2200821, 3094248
Offset: 0
Keywords
Examples
a(9) = 6 because we have [4, 1, 1, 1, 1, 1], [1, 4, 1, 1, 1, 1], [1, 1, 4, 1, 1, 1], [1, 1, 1, 4, 1, 1], [1, 1, 1, 1, 4, 1] and [1, 1, 1, 1, 1, 4].
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, 1): seq(a(n), n=0..50); # Alois P. Heinz, Dec 03 2020
-
Mathematica
nmax = 47; CoefficientList[Series[4/(3 + 2 EllipticTheta[3, 0, x] - EllipticTheta[3, 0, x]^2), {x, 0, nmax}], x]