login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 1 if A053669(n) [the smallest prime not dividing n] is of the form 6m+1, otherwise a(n) = 0.
5

%I #13 Apr 16 2024 02:39:47

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

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

%U 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

%N a(n) = 1 if A053669(n) [the smallest prime not dividing n] is of the form 6m+1, otherwise a(n) = 0.

%H Antti Karttunen, <a href="/A358754/b358754.txt">Table of n, a(n) for n = 1..100000</a>

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

%F a(n) = [A053669(n) == +1 (mod 6)], where [ ] is the Iverson bracket.

%F 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

%t 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 *)

%o (PARI)

%o A053669(n) = forprime(p=2, , if(n%p, return(p)));

%o A358754(n) = (1 == (A053669(n)%6));

%Y Characteristic function of A358756.

%Y Cf. A053669, A358755.

%Y Cf. also A353528.

%Y Differs from the characteristic function of A249674 for the first time at n=210, as here a(210) = 0.

%K nonn

%O 1

%A _Antti Karttunen_, Dec 03 2022