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!)
A319691 a(n) = 1 if n is either 1 or divisible only by primes congruent to 1 mod 3, 0 otherwise. 4

%I #13 Aug 26 2020 16:31:16

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

%T 0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,

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

%N a(n) = 1 if n is either 1 or divisible only by primes congruent to 1 mod 3, 0 otherwise.

%H Antti Karttunen, <a href="/A319691/b319691.txt">Table of n, a(n) for n = 1..65537</a>

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

%F a(n) = A319690(n) mod 2.

%F Fully multiplicative with a(p) = 1 if p is a prime of the form 3k+1, otherwise a(p) = 0.

%t Table[If[AllTrue[FactorInteger[n][[All,1]],Mod[#,3]==1&],1,0],{n,120}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 26 2020 *)

%o (PARI) A319691(n) = factorback(apply(p -> ((p%3)%2), factor(n)[, 1]));

%Y Characteristic function of A004611.

%Y Cf. A319690.

%K nonn,mult

%O 1

%A _Antti Karttunen_, Oct 04 2018

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 16 12:52 EDT 2024. Contains 371711 sequences. (Running on oeis4.)