The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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
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 1.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
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).
|a(n)| = A053866(n).
a(n) = A008836(n)*A053866(n). - Jon Maiga, Jan 11 2019
Sum_{k=1..n} a(k) ~ (1 - 1/sqrt(2)) * sqrt(n). - Vaclav Kotesovec, Oct 16 2020
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
Sequence in context: A354199 A214509 A053866 * A359818 A207710 A207735
KEYWORD
sign,mult
AUTHOR
Michael Somos, Aug 02 2008
STATUS
approved

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 14 02:26 EDT 2024. Contains 372528 sequences. (Running on oeis4.)