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!)
A059787 Distance between 2*(n-th prime) and next prime. 10

%I #14 May 15 2020 11:58:52

%S 1,1,1,3,1,3,3,3,1,1,5,5,1,3,3,1,9,5,3,7,3,5,1,1,3,9,5,9,5,1,3,1,3,3,

%T 9,5,3,5,3,1,1,5,1,3,3,3,9,3,3,3,1,1,5,1,7,15,3,5,3,1,3,1,3,9,5,7,11,

%U 3,7,3,3,1,5,5,3,3,9,3,7,3,1,11,1,11,3,1,9,5,7,3,3,9,3,1,11,3,1,7,3,5,3,3

%N Distance between 2*(n-th prime) and next prime.

%C If a(n)=1 then prime(n) is a Sophie Germain prime.

%H Robert Israel, <a href="/A059787/b059787.txt">Table of n, a(n) for n = 1..10000</a>

%p with(numtheory): [seq(nextprime(2*ithprime(k))-2*ithprime(k),k=1..256)];

%t Table[n2=2Prime[n];NextPrime[n2]-n2,{n,110}] (* _Harvey P. Dale_, Jun 07 2012 *)

%o (PARI) a(n) = my(pp=2*prime(n)); nextprime(pp) - pp; \\ _Michel Marcus_, Mar 22 2020

%Y Cf. A005385, A005384.

%K nonn

%O 1,4

%A _Labos Elemer_, Feb 22 2001

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 April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)