OFFSET
1,1
COMMENTS
More than the usual number of terms are shown in order to distinguish this from A239278.
a(n) = smallest odd prime missing from rad(n).
If rad(m) = rad(n), a(m) = a(n) (cf. A007947). - Bob Selcoe, Apr 04 2017
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
FORMULA
a(n) = 3 unless n == 0 (mod 3).
For n>3, a(n) < 3*log(n).
a(n) = A355001(2*n). - Antti Karttunen, Jul 18 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p odd prime} ((p*(p-1)/Product_{q odd prime <= p} q)) = 3.8401019546... . - Amiram Eldar, Jul 25 2022
MATHEMATICA
a[n_] := Module[{p = 3}, While[Divisible[n, p], p = NextPrime[p]]; p]; Array[a, 100] (* Amiram Eldar, Jul 25 2022 *)
PROG
(PARI) a(n) = my(p=3); while(gcd(n, p) != 1, p=nextprime(p+1)); p; \\ Michel Marcus, Apr 04 2017; corrected Jun 13 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 04 2017
STATUS
approved