OFFSET
0,4
COMMENTS
Also the number of nonnegative integer solutions (a_1, a_2, ... , a_n) to the equation a_1^2 + 2*a_2^2 + ... + n*a_n^2 = n*(n+1)*(2*n+1)/6.
FORMULA
a(n) = [x^(n*(n+1)*(2*n+1)/6)] Product_{k=1..n} (theta_3(x^k) + 1)/2, where theta_3() is the Jacobi theta function.
EXAMPLE
1*0^2 + 2*1^2 + 3*2^2 + 4*3^2 + 5*1^2 = 55.
1*0^2 + 2*1^2 + 3*4^2 + 4*0^2 + 5*1^2 = 55.
1*0^2 + 2*2^2 + 3*3^2 + 4*0^2 + 5*2^2 = 55.
1*0^2 + 2*4^2 + 3*1^2 + 4*0^2 + 5*2^2 = 55.
1*0^2 + 2*5^2 + 3*0^2 + 4*0^2 + 5*1^2 = 55.
1*1^2 + 2*1^2 + 3*1^2 + 4*1^2 + 5*3^2 = 55.
1*1^2 + 2*1^2 + 3*4^2 + 4*1^2 + 5*0^2 = 55.
1*1^2 + 2*3^2 + 3*0^2 + 4*2^2 + 5*2^2 = 55.
1*1^2 + 2*3^2 + 3*0^2 + 4*3^2 + 5*0^2 = 55.
1*1^2 + 2*3^2 + 3*2^2 + 4*1^2 + 5*2^2 = 55.
1*1^2 + 2*3^2 + 3*3^2 + 4*1^2 + 5*1^2 = 55.
1*1^2 + 2*5^2 + 3*0^2 + 4*1^2 + 5*0^2 = 55.
1*2^2 + 2*0^2 + 3*3^2 + 4*1^2 + 5*2^2 = 55.
1*2^2 + 2*1^2 + 3*0^2 + 4*1^2 + 5*3^2 = 55.
1*2^2 + 2*2^2 + 3*3^2 + 4*2^2 + 5*0^2 = 55.
1*2^2 + 2*3^2 + 3*2^2 + 4*2^2 + 5*1^2 = 55.
1*2^2 + 2*4^2 + 3*1^2 + 4*2^2 + 5*0^2 = 55.
1*3^2 + 2*1^2 + 3*1^2 + 4*3^2 + 5*1^2 = 55.
1*3^2 + 2*3^2 + 3*2^2 + 4*2^2 + 5*0^2 = 55.
1*4^2 + 2*0^2 + 3*1^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