A033684 1 iff n is a square not divisible by 3.
0, 1, 0, 0, 1, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 1, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0
References
- J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups, Springer-Verlag, p. 105, Eq. (40).
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65536
- Index entries for characteristic functions.
Programs
-
Maple
A033684 := proc(n) if issqr(n) then if n mod 3 = 0 then 0; else 1; end if; else 0; end if; end proc: seq(A033684(n),n=0..80) ; # R. J. Mathar, Oct 07 2011
-
Mathematica
Table[If[IntegerQ[Sqrt[n]]&&Mod[n,3]!=0,1,0],{n,0,130}] (* Harvey P. Dale, Oct 19 2018 *)
-
PARI
A033684(n) = (issquare(n)&&(n%3)); \\ Antti Karttunen, Sep 13 2017
Formula
Essentially the series psi_3(z)=(1/2)(theta_3(z/9)-theta_3(z)).
Multiplicative with a(p^e) = 1 if 2 divides e and p != 3, 0 otherwise. - Mitch Harris, Jun 09 2005
Dirichlet g.f.: zeta(2*s)*(1-3^(-2*s)). - R. J. Mathar, Mar 10 2011
Sum_{k=1..n} a(k) ~ 2*sqrt(n)/3. - Amiram Eldar, Jan 14 2024
Extensions
Data-section extended up to a(121) by Antti Karttunen, Sep 13 2017
Comments