login
a(n) = 1 if n is a square, -1 if n is five times a square.
4

%I #37 Oct 24 2023 04:36:38

%S 1,0,0,1,-1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,-1,0,0,0,0,1,0,0,0,0,0,0,0,0,

%T 0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0

%N a(n) = 1 if n is a square, -1 if n is five times a square.

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

%H G. C. Greubel, <a href="/A214293/b214293.txt">Table of n, a(n) for n = 1..1000</a>

%H Shaun Cooper and Michael Hirschhorn, <a href="http://dx.doi.org/10.1216/rmjm/1008959672">On some infinite product identities</a>, Rocky Mountain J. Math., 31 (2001) 131-139. see p. 134 Theorem 4.

%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 Expansion of (phi(q) - phi(q^5)) / 2 in powers of q where phi() is a Ramanujan theta function. - _Michael Somos_, Sep 24 2013

%F Expansion of q * f(q^3, q^7) * f(-q^4, -q^16) / f(-q^8, -q^12) in powers of q where f() is Ramanujan's two-variable theta function.

%F Expansion of q * f(x, x^9) * f(-q, -q^4) / f(-q^2, -q^3) in powers of q where f() is Ramanujan's two-variable theta function. - _Michael Somos_, Sep 24 2013

%F Euler transform of period 20 sequence [ 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, 1, 1, -1, 0, -1, 1, 0, 0, -1, ...].

%F Multiplicative with a(5^e) = (-1)^e, a(p^e) = 1 if e even, 0 otherwise.

%F G.f.: (theta_3(q) - theta_3(q^5)) / 2 = Sum_{k>0} x^(k^2) - x^(5*k^2).

%F Dirichlet g.f.: zeta(2*s) * (1 - 5^-s).

%F a(4*n + 2) = a(4*n + 3) = 0. a(4*n) = a(n). a(5*n) = -a(n).

%F a(4*n) = A214293(n). a(4*n+1) = A214960(n). - _Michael Somos_, Sep 24 2013

%F Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(5) = 0.5527864... (A322159). - _Amiram Eldar_, Oct 24 2023

%e G.f. = q + q^4 - q^5 + q^9 + q^16 - q^20 + q^25 + q^36 - q^45 + q^49 + q^64 + ...

%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^5]) / 2, {q, 0, n}];

%t a[ n_] := If[ n < 0, 0, Boole[ OddQ [ Length @ Divisors @ n]] - Boole[ OddQ [ Length @ Divisors [5 n]]]];

%o (PARI) {a(n) = issquare(n) - issquare(5*n)};

%o (PARI) {a(n) = if( n<1, 0, direuler( p=2, n, if( p==5, 1 - X, 1) / (1 - X^2 ))[n])};

%o (Magma) Basis( ModularForms( Gamma1(20), 1/2), 65) [2]; /* _Michael Somos_, Jul 01 2014 */

%Y Cf. A214284, A214295, A214960, A244612, A245485, A322159.

%K sign,mult,easy

%O 1,1

%A _Michael Somos_, Jul 10 2012