login
A319691
a(n) = 1 if n is either 1 or divisible only by primes congruent to 1 mod 3, 0 otherwise.
4
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, 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, 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
OFFSET
1
FORMULA
a(n) = A319690(n) mod 2.
Fully multiplicative with a(p) = 1 if p is a prime of the form 3k+1, otherwise a(p) = 0.
MATHEMATICA
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 *)
PROG
(PARI) A319691(n) = factorback(apply(p -> ((p%3)%2), factor(n)[, 1]));
CROSSREFS
Characteristic function of A004611.
Cf. A319690.
Sequence in context: A015989 A267417 A014189 * A079979 A288711 A347312
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Oct 04 2018
STATUS
approved