%I #25 Sep 08 2022 08:45:12
%S 2,0,2,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,
%T 0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,
%U 0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0
%N Expansion of Jacobi theta function theta_2(q)/q^(1/4).
%H G. C. Greubel, <a href="/A089800/b089800.txt">Table of n, a(n) for n = 0..5000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/JacobiThetaFunctions.html">Jacobi Theta Functions</a>
%H I. J. Zucker, <a href="http://dx.doi.org/10.1088/0305-4470/23/2/009">Further Relations Amongst Infinite Series and Products. II. The Evaluation of Three-Dimensional Lattice Sums</a>, J. Phys. A: Math. Gen. 23, 117-132, 1990.
%F For n > 0, a(n) = 2*(floor(sqrt(n+1/4)-1/2) - floor(sqrt(n-1+1/4)-1/2)). - _Mikael Aaltonen_, Jan 18 2015
%F a(n) = 2*(floor(sqrt(n+1)+1/2)-floor(sqrt(n)+1/2)). - _Mikael Aaltonen_, Jan 20 2015
%F a(n) = 2*A005369(n). - _Michel Marcus_, Jan 20 2015
%p A089800 := proc(n)
%p if issqr(1+4*n) then
%p if type( sqrt(1+4*n)-1,'even') then
%p 2;
%p else
%p 0;
%p end if;
%p else
%p 0;
%p end if;
%p end proc:
%p seq( A089800(n),n=0..40) ; # _R. J. Mathar_, Feb 22 2021
%t a[n_] := SeriesCoefficient[ EllipticTheta[2, 0, q]/q^(1/4), {q, 0, n}]; Table[a[n], {n, 0, 101}] (* _Jean-François Alcover_, Nov 12 2012 *)
%t Table[2*(Floor[Sqrt[n+1]+1/2] - Floor[Sqrt[n]+1/2]), {n,0,50}] (* _G. C. Greubel_, Nov 20 2017 *)
%o (PARI) for(n=0,50, print1(2*(floor(sqrt(n+1)+1/2) - floor(sqrt(n)+1/2)), ", ")) \\ _G. C. Greubel_, Nov 20 2017
%o (Magma) [2*(Floor(Sqrt(n+1)+1/2) - Floor(Sqrt(n)+1/2)): n in [0..50]]; // _G. C. Greubel_, Nov 20 2017
%K nonn
%O 0,1
%A _Eric W. Weisstein_, Nov 12 2003