[go: up one dir, main page]

login
A214507
a(n) = 1 if n is one or two times an even square, -1 if one or two times an odd square else 0.
1
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
OFFSET
0,1
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
LINKS
S. Cooper and M. 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 f(-x^2, -x^2) * f(x^6, x^10) / f(x, x^3) in powers of x where f() is Ramanujan's two-variable theta function.
a(n) = - b(n) where b(n) is multiplicative with b(2) = 1, b(2^e) = -1 if e>1, b(p^e) = (1 + (-1)^e) / 2 if p>2.
Euler transform of period 32 sequence [ -1, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, 0, -1, 0, -1, -1, -1, -1, ...].
G.f.: (theta_4(q) + theta_4(q^2)) / 2 = 1 + (Sum_{k>0} (-1)^k * (x^(k^2) + x^(2*k^2))).
a(n) = (-1)^(n * (n + 1)/2) * A093709(n).
EXAMPLE
1 - q - q^2 + q^4 + q^8 - q^9 + q^16 - q^18 - q^25 + q^32 + q^36 - q^49 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 4, 0, q] + EllipticTheta[ 4, 0, q^2]) / 2, {q, 0, n}]
a[ n_] := If[ n < 0, 0, (-1)^(n (n + 1)/2) Boole[ OddQ[ Length @ Divisors[ n]] || OddQ[ Length @ Divisors[ 2 n]]]]
PROG
(PARI) {a(n) = (-1)^(n * (n + 1)/2) * (issquare(n) || issquare(2*n))}
CROSSREFS
Cf. A093709.
Sequence in context: A076141 A011751 A341540 * A093709 A079295 A088025
KEYWORD
sign,changed
AUTHOR
Michael Somos, Jul 19 2012
STATUS
approved