login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008442 Expansion of Jacobi theta constant (theta_2(2z))^2/4. 7

%I #44 May 17 2023 10:24:24

%S 1,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,0,0,

%T 0,0,2,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,

%U 0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,0

%N Expansion of Jacobi theta constant (theta_2(2z))^2/4.

%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

%C a(n) is the number of ways of writing 2n as the sum of two odd positive squares. (Cf. A290081 & A008441). - _Antti Karttunen_, Jul 24 2017

%D J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.

%D Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 78, Eq. (32.26).

%H T. D. Noe, <a href="/A008442/b008442.txt">Table of n, a(n) for n = 1..1000</a>

%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.

%F Fine gives an explicit formula for a(n) in terms of the divisors of n.

%F a(n) = number of divisors of n of form 8n+1, 8n+5, 8n+6 minus number of divisors of form 8n+2, 8n+3, 8n+7. [I think Fine's version is simpler - _N. J. A. Sloane_]

%F G.f.: s(8)^4/(s(4)^2), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]

%F Expansion of q * psi(q^4)^2 in powers of q where psi() is a Ramanujan theta function. - _Michael Somos_, Feb 22 2015

%F Expansion of eta(q^8)^4 / eta(q^4)^2 in powers of q.

%F Euler transform of period 8 sequence [ 0, 0, 0, 2, 0, 0, 0, -2, ...]. - _Michael Somos_, Apr 24 2004

%F a(n)=0 unless n=4k+1 in which case a(n) is the difference between number of divisors of n of form 4k+1 and 4k+3.

%F Multiplicative with a(2^e) = 0^e, a(p^e) = (1 + (-1)^e)/2 if p==3 mod 4 otherwise a(p^e) = 1+e. - _Michael Somos_, Sep 18 2004

%F Moebius transform is period 8 sequence [ 1, -1, -1, 0, 1, 1, -1, 0, ...]. - _Michael Somos_, Sep 02 2005

%F G.f.: Sum_{k>0} Kronecker(-4, k) * x^k / (1 - x^(2*k)) = Sum_{k>0} x^(2*k - 1) / (1 + x^(4*k - 2)). - _Michael Somos_, Sep 20 2005

%F G.f.: Sum_{k>0} x^k * (1 - x^k) * (1 - x^(2*k)) * (1 - x^(3*k)) / (1 - x^(8*k)) = x Product_{k>0} (1 - x^(8*k))^4 / (1 - x^(4*k))^2. - _Michael Somos_, Apr 24 2004

%F a(4*n + 1) = A008441(n).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/8 = 0.392699... (A019675). - _Amiram Eldar_, Oct 23 2022

%e G.f. = q + 2*q^5 + q^9 + 2*q^13 + 2*q^17 + 3*q^25 + 2*q^29 + 2*q^37 + ...

%t a[n_] := Sum[{0, 1, -1, -1, 0, 1, 1, -1}[[Mod[d, 8] + 1]], {d, Divisors[n]}]; Table[a[n], {n, 1, 105}] (* _Jean-François Alcover_, May 15 2013, after _Michael Somos_ *)

%t a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, x^2]^2 / 4, {x, 0, n}]; (* _Michael Somos_, Feb 22 2015 *)

%t a[ n_] := If[ n < 1 || Mod[n, 4] != 1, 0, Sum[ KroneckerSymbol[ 4, d], {d, Divisors @n}]]; (* _Michael Somos_, Feb 22 2015 *)

%o (PARI) {a(n) = if( n<1 || n%4!=1, 0, sumdiv(n, d, (d%4==1) - (d%4==3)))}; /* _Michael Somos_, Apr 24 2004 */

%o (PARI) {a(n) = if( n<1, 0, sumdiv(n, d, [0, 1, -1, -1, 0, 1, 1, -1][d%8+1]))}; /* _Michael Somos_, Apr 24 2004 */

%o (PARI) {a(n) = local(A); if( n<1, 0, n--; A = x * O(x^n); polcoeff( eta(x^8 + A)^4 / eta(x^4 + A)^2, n))}; /* _Michael Somos_, Apr 24 2004 */

%o (Magma) A := Basis( ModularForms( Gamma1(16), 1), 106); A[2] + 2*A[6]; /* _Michael Somos_, Feb 22 2015 */

%o (Python)

%o from sympy import divisors

%o def A008442(n): return 0 if n&3!=1 else sum(((a:=d&3)==1)-(a==3) for d in divisors(n,generator=True)) # _Chai Wah Wu_, May 17 2023

%Y Cf. A008441, A019675.

%Y Even bisection of A290081.

%K nonn,mult

%O 1,5

%A _N. J. A. Sloane_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 01:13 EDT 2024. Contains 372143 sequences. (Running on oeis4.)