login
A358755
a(n) = 1 if A053669(n) [the smallest prime not dividing n] is of the form 6m-1, otherwise a(n) = 0.
7
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, 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, 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, 1
OFFSET
1
COMMENTS
The XOR-formula involving A358842 corresponds to the XOR-formula given for A353529, which is based on the lemma given in A353516. A similar lemma exists for mod 6 case.
FORMULA
a(n) = [A053669(n) == -1 (mod 6)], where [ ] is the Iverson bracket.
For all n >= 6, a(n) = A358842(n) XOR A358842(n-6), where XOR is bitwise-XOR, A003987.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime, p == 5 (mod 6)} ((p-1)/(Product_{q prime, q <= p} q)) = 0.1376937818... . - Amiram Eldar, Apr 16 2024
EXAMPLE
For n = 6 = 2*3, the smallest prime that does not divide it is 5, which is of the form 6m-1, therefore a(6) = 1.
For n = 30 = 2*3*5, the smallest prime that does not divide it is 7, which is of the form 6m+1, therefore a(30) = 0.
For n = 210 = 2*3*5*7, the smallest prime that does not divide it is 11, which is of the form 6m-1, therefore a(210) = 1.
For n = 2310 = 2*3*5*7*11, the smallest prime that does not divide it is 13, which is of the form 6m+1, therefore a(2310) = 0.
For n = 30030 = 2*3*5*7*11*13, the smallest prime that does not divide it is 17, which is of the form 6m-1, therefore a(30030) = 1.
For n = 223092870 = 2*3*5*7*11*13*17*19*23, the smallest nondividing prime is 29, which is of the form 6m-1, therefore a(223092870) = 1. This is also the least n where this sequence differs from the characteristic function of the even terms of A342051, (numbers k such that k is even and A276084(k) is also even).
MATHEMATICA
a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; Boole[Mod[p, 6] == 5]]; Array[a, 100] (* Amiram Eldar, Apr 16 2024 *)
PROG
(PARI)
A053669(n) = forprime(p=2, , if(n%p, return(p)));
A358755(n) = (5 == (A053669(n)%6));
CROSSREFS
Characteristic function of A358757.
Cf. A003987, A053669, A358754, A358842, A358847 [= a(6*n)].
Differs from A353528 for the first time at n=210, as here a(210) = 1.
Cf. also A276084, A342051, A353529.
Sequence in context: A286925 A179527 A353528 * A172051 A093958 A044936
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 03 2022
STATUS
approved