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 of ways to write 2*n as an ordered sum of n squares of positive integers.
3

%I #11 Feb 04 2021 15:22:12

%S 1,0,0,3,0,0,15,0,8,84,0,110,495,0,1092,3018,120,9520,18870,2907,

%T 77520,120270,43890,606188,780023,531300,4620200,5161377,5651100,

%U 34622172,35045340,55234560,256503672,245772464,508930224,1886151225,1788167610,4491607230

%N Number of ways to write 2*n as an ordered sum of n squares of positive integers.

%C Also number of ways to write n as an ordered sum of n nonnegative numbers one less than a square.

%H Alois P. Heinz, <a href="/A338464/b338464.txt">Table of n, a(n) for n = 0..2000</a>

%F a(n) = [x^(2*n)] ((theta_3(x) - 1) / 2)^n, where theta_3() is the Jacobi theta function.

%F a(n) = [x^n] (Sum_{k>=0} x^(k*(k + 2)))^n.

%F a(n) = A337165(2n,n). - _Alois P. Heinz_, Feb 04 2021

%p b:= proc(n, t) option remember;

%p `if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add((s->

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

%p end:

%p a:= n-> b(2*n, n):

%p seq(a(n), n=0..39); # _Alois P. Heinz_, Feb 04 2021

%t Table[SeriesCoefficient[((EllipticTheta[3, 0, x] - 1)/2)^n, {x, 0, 2 n}], {n, 0, 37}]

%Y Cf. A000290, A005563, A066535, A111178, A287617, A303333, A337165.

%K nonn

%O 0,4

%A _Ilya Gutkovskiy_, Jan 31 2021