cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A284721 #36 Dec 09 2024 23:22:40
%S A284721 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 A284721 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 A284721 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 A284721 Smallest odd prime that is relatively prime to 2n+1.
%C A284721 More than the usual number of terms are shown in order to distinguish this from A239278.
%C A284721 a(n) = smallest odd prime missing from rad(2*n+1).
%C A284721 If rad(2m+1) = rad(2n+1), a(m) = a(n) (cf. A007947). - _Bob Selcoe_, Apr 04 2017
%H A284721 Robert Israel, <a href="/A284721/b284721.txt">Table of n, a(n) for n = 0..10000</a>
%F A284721 a(n) = 3 unless n == 1 (mod 3).
%F A284721 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 A284721 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
%p A284721 f:= proc(n) local p;
%p A284721  p:= 2;
%p A284721  do
%p A284721    p:= nextprime(p);
%p A284721    if igcd(p,2*n+1)=1 then return p fi
%p A284721  od
%p A284721 end proc:
%p A284721 map(f, [$0..100]); # _Robert Israel_, Dec 09 2024
%t A284721 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 A284721 (PARI) a(n) = my(p=3); while(gcd(2*n+1, p) != 1, p=nextprime(p+1)); p; \\ _Michel Marcus_, Apr 04 2017
%Y A284721 Similar to but different from A239278.
%Y A284721 Cf. A002110, A007947, A284722, A284723.
%K A284721 nonn
%O A284721 0,1
%A A284721 _N. J. A. Sloane_, Apr 04 2017