login
1 iff n is a square not divisible by 3.
4

%I #42 Jan 14 2024 03:12:08

%S 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,

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

%N 1 iff n is a square not divisible by 3.

%C a(n)=1 iff n-1 is in the list A057780. - _Jason Kimberley_, Nov 13 2012

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

%H Antti Karttunen, <a href="/A033684/b033684.txt">Table of n, a(n) for n = 0..65536</a>

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

%F Essentially the series psi_3(z)=(1/2)(theta_3(z/9)-theta_3(z)).

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

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

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

%F a(n) = A010052(n)*A011655(n). - _Antti Karttunen_, Sep 13 2017

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

%p A033684 := proc(n)

%p if issqr(n) then

%p if n mod 3 = 0 then

%p 0;

%p else

%p 1;

%p end if;

%p else

%p 0;

%p end if;

%p end proc:

%p seq(A033684(n),n=0..80) ; # _R. J. Mathar_, Oct 07 2011

%t Table[If[IntegerQ[Sqrt[n]]&&Mod[n,3]!=0,1,0],{n,0,130}] (* _Harvey P. Dale_, Oct 19 2018 *)

%o (PARI) A033684(n) = (issquare(n)&&(n%3)); \\ _Antti Karttunen_, Sep 13 2017

%Y Cf. A010052, A011655, A033683, A057780.

%K nonn,easy,mult

%O 0,1

%A _N. J. A. Sloane_

%E Data-section extended up to a(121) by _Antti Karttunen_, Sep 13 2017