OFFSET
0,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(2*n+1).
If rad(2m+1) = rad(2n+1), a(m) = a(n) (cf. A007947). - Bob Selcoe, Apr 04 2017
FORMULA
a(n) = 3 unless n == 1 (mod 3).
For all n >= 2, a(n) < 3*log(2*n+1). Also, for all n >= 1, a(n) < 5*log(2*n+1). [Upper bound corrected by N. J. A. Sloane, Apr 15 2017. Thanks to Bob Selcoe for pointing out that the old bound failed at n=1.]
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2 * Sum_{k>=2} (prime(k) * (1/prime(k-1)# - 1/prime(k)#)) = 3.84010195463226942418..., where prime(k)# = A002110(k). - Amiram Eldar, Dec 09 2023
MATHEMATICA
a[n_] := Module[{p = 3}, While[Divisible[2*n + 1, p], p = NextPrime[p]]; p]; Array[a, 100, 0] (* Amiram Eldar, Dec 09 2023 *)
PROG
(PARI) a(n) = my(p=3); while(gcd(2*n+1, p) != 1, p=nextprime(p+1)); p; \\ Michel Marcus, Apr 04 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 04 2017
STATUS
approved