login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105673 One-half of theta series of square lattice (or half the number of ways of writing n > 0 as a sum of 2 squares), without the constant term, which is 1/2. 5
2, 2, 0, 2, 4, 0, 0, 2, 2, 4, 0, 0, 4, 0, 0, 2, 4, 2, 0, 4, 0, 0, 0, 0, 6, 4, 0, 0, 4, 0, 0, 2, 0, 4, 0, 2, 4, 0, 0, 4, 4, 0, 0, 0, 4, 0, 0, 0, 2, 6, 0, 4, 4, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 2, 8, 0, 0, 4, 0, 0, 0, 2, 4, 4, 0, 0, 0, 0, 0, 4, 2, 4, 0, 0, 8, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 4, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

This is the Jacobi elliptic function K(q)/Pi - 1/2 [see Fine].

REFERENCES

N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; Eq. (34.4).

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..10000

FORMULA

G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = (u-v)^2 - (v-w) * (4*w + 2). - Michael Somos, May 13 2005

a(n) = 2 * A002654(n). - Michael Somos, Jan 25 2017

EXAMPLE

G.f. = 2*q + 2*q^2 + 2*q^4 + 4*q^5 + 2*q^8 + 2*q^9 + 4*q^10 + 4*q^13 + 2*q^16 + ...

MATHEMATICA

CoefficientList[Series[(EllipticTheta[3, 0, x]^2 - 1)/(2 x), {x, 0, 100}], x] (* Jan Mangaldan, Jan 04 2017 *)

a[ n_] := If[ n < 1, 0, SquaresR[ 2, n] / 2]; (* Michael Somos, Jan 25 2017 *)

a[ n_] := If[ n < 1, 0, 2 DivisorSum[ n, KroneckerSymbol[ -4, #] &]]; (* Michael Somos, Jan 25 2017 *)

a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q]^2 - 1) / 2, {q, 0, n}]; (* Michael Somos, Jan 25 2017 *)

PROG

(PARI) qfrep([1, 0; 0, 1], 100)

(PARI) {a(n) = if( n<1, 0, qfrep([1, 0; 0, 1], n)[n])}; /* Michael Somos, May 13 2005 */

(PARI) {a(n) = if( n<1, 0, 2 * sumdiv( n, d, (d%4==1) - (d%4==3)))}; /* Michael Somos, Jan 25 2017 */

CROSSREFS

(Theta_3)^2 is given in A004018.

Equals A004018(n)/2 for n > 0.

Sequence in context: A215976 A141058 A102706 * A259761 A171933 A074823

Adjacent sequences:  A105670 A105671 A105672 * A105674 A105675 A105676

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, May 05 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 17 12:09 EST 2018. Contains 317276 sequences. (Running on oeis4.)