login
A358754
a(n) = 1 if A053669(n) [the smallest prime not dividing n] is of the form 6m+1, otherwise a(n) = 0.
4
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, 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, 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, 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, 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, 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
OFFSET
1
FORMULA
a(n) = [A053669(n) == +1 (mod 6)], where [ ] is the Iverson bracket.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime, p == 1 (mod 6)} ((p-1)/(Product_{q prime, q <= p} q)) = 0.02897288485... . - Amiram Eldar, Apr 16 2024
MATHEMATICA
a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; Boole[Mod[p, 6] == 1]]; Array[a, 100] (* Amiram Eldar, Apr 16 2024 *)
PROG
(PARI)
A053669(n) = forprime(p=2, , if(n%p, return(p)));
A358754(n) = (1 == (A053669(n)%6));
CROSSREFS
Characteristic function of A358756.
Cf. also A353528.
Differs from the characteristic function of A249674 for the first time at n=210, as here a(210) = 0.
Sequence in context: A070204 A011745 A011744 * A354996 A351539 A354926
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 03 2022
STATUS
approved