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

%I #17 Jul 25 2022 22:42:07

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

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

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

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

%H Antti Karttunen, <a href="/A353529/b353529.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 If A353526(n) = 3 [A053669(n) is in A002145], then a(n) = 1, otherwise a(n) = 0.

%F For all n >= 2, a(n) = A353489(n) XOR A353489(n-2), where XOR is bitwise-XOR, A003987.

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime, p == 3 (mod 4)} ((p-1)/(Product_{q prime, q <= p} q)) = 0.3662357207... . - _Amiram Eldar_, Jul 25 2022

%t f[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; p]; a[n_] := If[Mod[f[n], 4] == 3, 1, 0]; Array[a, 100] (* _Amiram Eldar_, Jul 25 2022 *)

%o (PARI)

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

%o A353529(n) = (3==(A053669(n)%4));

%Y Characteristic function of A353531.

%Y Cf. A002145, A003987, A053669, A059841, A353489, A353526, A353528.

%Y Differs from A353525 for the first time at n=210, where a(210) = 1, while A353525(210) = 0.

%K nonn

%O 1

%A _Antti Karttunen_, Apr 24 2022