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!)
A098013 Differences between consecutive primes that are twice primes. 2

%I #13 Jan 31 2020 13:39:06

%S 4,4,4,6,6,4,4,6,6,6,4,6,4,6,4,4,4,14,4,6,10,6,6,4,6,6,10,4,4,4,6,10,

%T 6,6,6,6,4,10,14,4,4,14,6,10,4,6,6,6,4,6,4,10,10,6,4,6,4,4,4,4,6,6,10,

%U 6,6,6,10,6,6,6,6,4,10,4,6,6,4,6,10,10,6,6,4,6,4,4,14,10,10,4,10,14,4,4,14

%N Differences between consecutive primes that are twice primes.

%C 11 - 7 = 4 = double 2, the first entry in the table.

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

%p R:= NULL: count:= 0:

%p q:= 2: p:= 3:

%p while count < 100 do

%p q:= p; p:= nextprime(p);

%p if isprime((p-q)/2) then

%p count:= count+1; R:= R, p-q

%p fi

%p od:

%p R; # _Robert Israel_, Jun 05 2018

%t Select[Differences[Prime[Range[500]]],PrimeQ[#/2]&] (* _Harvey P. Dale_, Jan 31 2020 *)

%o (PARI) f(n) = for(x=1,n,y=prime(x+1)-prime(x);if(isprime(y\2),print1(y",")))

%Y Cf. A100484 (twice primes).

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Sep 09 2004

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 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)