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

%I #13 Jul 25 2022 22:42:03

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

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

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

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

%H Antti Karttunen, <a href="/A353528/b353528.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) = 1, then a(n) = 1, otherwise a(n) = 0.

%F a(n) = A059841(n) - A353529(n).

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime, p == 1 (mod 4)} ((p-1)/(Product_{q prime, q <= p} q)) = 0.1337642792... . - _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] == 1, 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 A353528(n) = (1==(A053669(n)%4));

%Y Characteristic function of A353530.

%Y Cf. A053669, A059841, A353526, A353529.

%Y Cf. also A353488.

%Y Not the same as A319691(25+n).

%K nonn

%O 1

%A _Antti Karttunen_, Apr 24 2022