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!)
A214295 a(n) = 1 if n is a square, -1 if n is three times a square, 0 otherwise. 7

%I #40 Oct 24 2023 04:35:22

%S 1,0,-1,1,0,0,0,0,1,0,0,-1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,-1,0,0,0,0,0,0,

%T 0,0,1,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,0,1,0,0,0,

%U 0,0,0,0,0,0,0,-1,0,0,0,0,0,1,0,0,0,0

%N a(n) = 1 if n is a square, -1 if n is three times a square, 0 otherwise.

%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

%C a(A092206(n)) = 0; a(A000290(n)) = 1; a(A033428(n)) = -1.

%H Reinhard Zumkeller, <a href="/A214295/b214295.txt">Table of n, a(n) for n = 1..10000</a>

%H Shaun Cooper and Michael 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 3.

%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.

%F Expansion of q * psi(q^3) * f(-q^2, -q^10) / f(-q^5, -q^7) in powers of q where psi(), f() are Ramanujan theta functions.

%F Multiplicative with a(3^e) = (-1)^e, a(p^e) = 1 if e even, 0 otherwise.

%F G.f.: (theta_3(q) - theta_3(q^3)) / 2 = Sum_{k>0} x^(k^2) - x^(3*k^2).

%F Dirichlet g.f.: zeta(2*s) * (1 - 3^(-*s)). [corrected by _Amiram Eldar_, Oct 24 2023]

%F a(3*n) = - a(n). - _Reinhard Zumkeller_, Jul 12 2012

%F Expansion of (phi(q) - phi(q^3)) / 2 = q * chi(q) * f(-q, -q^11) in powers fof q where phi(), chi(), f() are Ramanujan theta functions. - _Michael Somos_, Jan 10 2015

%F Euler transform of period 12 sequence [ 0, -1, 1, 0, 1, -1, 1, 0, 1, -1, 0, -1, ...]. - _Michael Somos_, Jan 10 2015

%F Convolution product of A000700 and A247133. - _Michael Somos_, Jan 10 2015

%F Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(3) = 0.42264973... . - _Amiram Eldar_, Oct 24 2023

%e G.f. = q - q^3 + q^4 + q^9 - q^12 + q^16 + q^25 - q^27 + q^36 - q^48 + q^49 + ...

%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^3]) / 2, {q, 0, n}];

%t a[ n_] := Boole[ IntegerQ[ Sqrt[ n]]] - Boole[ IntegerQ[ Sqrt[ 3 n]]]; (* _Michael Somos_, Jun 10 2014 *)

%t Table[Which[IntegerQ[Sqrt[n]],1,IntegerQ[Sqrt[n/3]],-1,True,0],{n,120}] (* _Harvey P. Dale_, Apr 08 2013 *)

%o (PARI) {a(n) = issquare(n) - issquare(3*n)};

%o (PARI) {a(n) = if( n<1, 0, direuler( p=2, n, if( p==3, 1 - X, 1) / (1 - X^2 ))[n])};

%o (Haskell)

%o a214295 n = a010052 n - a010052 (3*n) -- _Reinhard Zumkeller_, Jul 12 2012

%o (Magma) Basis( ModularForms( Gamma1(12), 1/2), 50) [2] ; /* _Michael Somos_, Jun 10 2014 */

%Y Cf. A000700, A010052, A214293, A244612, A247133, A245485.

%K sign,mult

%O 1,1

%A _Michael Somos_, Jul 10 2012

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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)