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”).

A214509
a(n) = 1 if n is an odd square or twice a nonzero even square, -1 if a nonzero even square or twice an odd square else 0.
1
1, -1, 0, -1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
OFFSET
1,1
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
LINKS
Shaun Cooper and Michael Hirschhorn, On some infinite product identities, Rocky Mountain J. Math., 31 (2001), 131-139. See p. 133 Theorem 2.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions.
FORMULA
Expansion of (- phi(-q) + phi(-q^2)) / 2 in powers of q where phi() is a Ramanujan theta function.
Expansion of x * f(-x^2, -x^2) * f(x^2, x^14) / f(x, x^3) in powers of x where f() is Ramanujan's two-variable theta function.
a(n) is multiplicative with a(2) = -1, a(2^e) = (-1)^(e+1) if e>1, a(p^e) = (1 + (-1)^e) / 2 if p>2.
Euler transform of period 32 sequence [ -1, 0, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, -1, 0, -1, -1, -1, 0, -1, -1, -1, -1, -1, 0, -1, -1, ...].
G.f.: (theta_4(q^2) - theta_4(q)) / 2 = (Sum_{k>0} (-1)^k * (x^(2*k^2) - x^(k^2))).
a(n) = -(-1)^(n * (n + 1)/2) * A143259(n).
Dirichlet g.f.: (1 - 1/2^(2*s-1)) * (1 - 1/2^s) * zeta(2*s). - Amiram Eldar, Sep 12 2023
EXAMPLE
G.f. = q - q^2 - q^4 + q^8 + q^9 - q^16 - q^18 + q^25 + q^32 - q^36 + q^49 - q^50 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 4, 0, q^2] - EllipticTheta[ 4, 0, q]) / 2, {q, 0, n}];
a[ n_] := If[ n < 0, 0, (-1)^(n (n + 1)/2) ( Boole @ OddQ[ Length @ Divisors[ 2 n]] - Boole @ OddQ[ Length @ Divisors[ n]])];
PROG
(PARI) {a(n) = (-1)^(n * (n + 1)/2) * (issquare(2*n) - issquare(n))};
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Jul 19 2012
STATUS
approved