login
a(n) = 1 if n is an odd square not divisible by 3, otherwise 0.
6

%I #44 Jan 14 2024 03:11:57

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

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

%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

%N a(n) = 1 if n is an odd square not divisible by 3, otherwise 0.

%D J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 105, Eq. (41).

%H Antti Karttunen, <a href="/A033683/b033683.txt">Table of n, a(n) for n = 0..65537</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.

%F Essentially the series psi_6(z)=(1/2)(theta_2(z/9)-theta_2(z)).

%F a(A104777(n)) = 1.

%F A080995(n) = a(24n+1).

%F Multiplicative with a(p^e) = 1 if 2 divides e and p > 3, 0 otherwise. - _Mitch Harris_, Jun 09 2005

%F Euler transform of a period 144 sequence. - _Michael Somos_, Jan 26 2008

%F a(n) = A033684(n) * A000035(n).

%F Dirichlet g.f.: zeta(2*s) *(1-2^(-2s)) *(1-3^(-2s)). - _R. J. Mathar_, Mar 10 2011

%F G.f.: Sum_{k in Z} x^(6*k+1)^2. - _Michael Somos_, Dec 07 2019

%F Sum_{k=1..n} a(k) ~ sqrt(n)/3. - _Amiram Eldar_, Jan 14 2024

%e G.f. = x + x^25 + x^49 + x^121 + x^169 + x^289 + x^361 + x^529 + x^625 + ...

%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 2, 0, x^4] - EllipticTheta[ 2, 0, x^36])/2, {x, 0, n}] // PowerExpand; (* _Michael Somos_, Dec 07 2019 *)

%t Table[If[OddQ[n]&&IntegerQ[Sqrt[n]]&&Mod[n,3]!=0,1,0],{n,0,120}] (* _Harvey P. Dale_, Sep 06 2020 *)

%o (PARI) {a(n) = if( n%24 == 1, issquare(n), 0)}; /* _Michael Somos_, Jan 26 2008 */

%o (Haskell)

%o a033683 n = fromEnum $ odd n && mod n 3 > 0 && a010052 n == 1

%o -- _Reinhard Zumkeller_, Nov 14 2015

%o (Magma) Basis( ModularForms( Gamma0(144), 1/2), 106)[2]; /* _Michael Somos_, Dec 07 2019 */

%Y Cf. A098108, A033684.

%Y Cf. A010052, A010872, A104777.

%K nonn,mult,easy

%O 0,1

%A _N. J. A. Sloane_