The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A284721 Smallest odd prime that is relatively prime to 2n+1. 3

%I #31 Dec 09 2023 07:09:30

%S 3,5,3,3,5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,

%T 5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,5,3,3,11,3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,

%U 3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,3,3,5,3,3,5,3,3,5,3,3,5,3,3,7,3,3,5

%N Smallest odd prime that is relatively prime to 2n+1.

%C More than the usual number of terms are shown in order to distinguish this from A239278.

%C a(n) = smallest odd prime missing from rad(2*n+1).

%C If rad(2m+1) = rad(2n+1), a(m) = a(n) (cf. A007947). - _Bob Selcoe_, Apr 04 2017

%F a(n) = 3 unless n == 1 (mod 3).

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

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

%t a[n_] := Module[{p = 3}, While[Divisible[2*n + 1, p], p = NextPrime[p]]; p]; Array[a, 100, 0] (* _Amiram Eldar_, Dec 09 2023 *)

%o (PARI) a(n) = my(p=3); while(gcd(2*n+1, p) != 1, p=nextprime(p+1)); p; \\ _Michel Marcus_, Apr 04 2017

%Y Similar to but different from A239278.

%Y Cf. A002110, A007947, A284722, A284723.

%K nonn

%O 0,1

%A _N. J. A. Sloane_, Apr 04 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 4 15:36 EDT 2024. Contains 373099 sequences. (Running on oeis4.)