This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A143259 #44 Feb 16 2025 08:33:08 %S A143259 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, %T A143259 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, %U A143259 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 %N A143259 a(n) = 1 if n is a nonzero square, -1 if n is twice a nonzero square, 0 otherwise. %C A143259 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). %H A143259 Antti Karttunen, <a href="/A143259/b143259.txt">Table of n, a(n) for n = 1..65537</a> %H A143259 S. Cooper and M. 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. 133 Theorem 1. %H A143259 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a> %H A143259 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a> %F A143259 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. %F A143259 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 %F A143259 Euler transform of period 8 sequence [ -1, 0, 1, 1, 1, 0, -1, -1, ...]. %F A143259 a(2*n) = -a(n) for all n in Z. %F A143259 a(n) is multiplicative with a(2^e) = (-1)^e, a(p^e) = (1 + (-1)^e) / 2 if p == 1 (mod 2). %F A143259 Dirichlet g.f.: zeta(2*s) * (1 - 2^-s); Dirichlet convolution of A010052 and A154955. %F A143259 G.f. A(x) satisfies: A(x) / A(x^2) = -1 + A111374(x). %F A143259 G.f. A(x) satisfies: A(x^2) = - (A(x) + A(-x)) / 2. %F A143259 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). %F A143259 G.f.: (theta_3(q) - theta_3(q^2)) / 2 = Sum_{k>0} x^(k^2) - x^(2k^2). %F A143259 |a(n)| = A053866(n). %F A143259 a(n) = A008836(n)*A053866(n). - _Jon Maiga_, Jan 11 2019 %F A143259 Sum_{k=1..n} a(k) ~ (1 - 1/sqrt(2)) * sqrt(n). - _Vaclav Kotesovec_, Oct 16 2020 %e A143259 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 + ... %t A143259 f[n_]:=Which[IntegerQ[Sqrt[n/2]],-1,IntegerQ[Sqrt[n]],1,True,0]; Array[f,110] (* _Harvey P. Dale_, Jul 07 2011 *) %t A143259 a[ n_] := Boole[ IntegerQ[ Sqrt[n]]] - Boole[ IntegerQ[ Sqrt[2 n]]]; (* _Michael Somos_, Jun 10 2014 *) %t A143259 a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^2])/2, {q, 0, n}]; (* _Michael Somos_, Jun 10 2014 *) %t A143259 Table[LiouvilleLambda[n]*Mod[DivisorSigma[1, n], 2], {n, 100}] (* _Jon Maiga_, Jan 11 2019 *) %o A143259 (PARI) {a(n) = issquare(n) - issquare(2*n)}; %o A143259 (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))}; %o A143259 (Magma) Basis( ModularForms( Gamma1(8), 1/2), 100) [2] ; /* _Michael Somos_, Jun 10 2014 */ %Y A143259 Cf. A008836, A010052, A053866, A111374, A154955. %K A143259 sign,mult %O A143259 1,1 %A A143259 _Michael Somos_, Aug 02 2008