|
|
A143259
|
|
a(n) = 1 if n is a nonzero square, -1 if n is twice a nonzero square, 0 otherwise.
|
|
6
|
|
|
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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Expansion of (phi(q) - phi(q^2)) / 2 = q * psi(q^4) * f(-q, -q^7) / f(-q^3, -q^5) in powers of q where phi(), psi() and f() are Ramanujan theta functions.
Expansion of q * f(-q, -q^7)^2 / psi(-q) in powers of q where psi(), f() are Ramanujan theta functions. - Michael Somos, Jan 01 2015
Euler transform of period 8 sequence [ -1, 0, 1, 1, 1, 0, -1, -1, ...].
a(2*n) = -a(n) for all n in Z.
a(n) is multiplicative with a(2^e) = (-1)^e, a(p^e) = (1 + (-1)^e) / 2 if p == 1 (mod 2).
Dirichlet g.f.: zeta(2*s) * (1 - 2^-s); Dirichlet convolution of A010052 and A154955.
G.f. A(x) satisfies: A(x) / A(x^2) = -1 + A111374(x).
G.f. A(x) satisfies: A(x^2) = - (A(x) + A(-x)) / 2.
G.f. A(x) satisfies: 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = w * (u + v)^2 - v * (v + w) * (v + 2*w).
G.f.: (theta_3(q) - theta_3(q^2)) / 2 = Sum_{k>0} x^(k^2) - x^(2k^2).
|
|
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
|
f[n_]:=Which[IntegerQ[Sqrt[n/2]], -1, IntegerQ[Sqrt[n]], 1, True, 0]; Array[f, 110] (* Harvey P. Dale, Jul 07 2011 *)
a[ n_] := Boole[ IntegerQ[ Sqrt[n]]] - Boole[ IntegerQ[ Sqrt[2 n]]]; (* Michael Somos, Jun 10 2014 *)
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^2])/2, {q, 0, n}]; (* Michael Somos, Jun 10 2014 *)
Table[LiouvilleLambda[n]*Mod[DivisorSigma[1, n], 2], {n, 100}] (* Jon Maiga, Jan 11 2019 *)
|
|
PROG
|
(PARI) {a(n) = issquare(n) - issquare(2*n)};
(PARI) {a(n) = if( n<1, 0, n--; polcoeff( prod(k=1, n, (1 - x^k)^([1, 1, 0, -1, -1, -1, 0, 1][k%8 + 1]), 1 + x * O(x^n)), n))};
(Magma) Basis( ModularForms( Gamma1(8), 1/2), 100) [2] ; /* Michael Somos, Jun 10 2014 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|