OFFSET
0,1
COMMENTS
Primes that are one greater than the difference between consecutive primes.
LINKS
Cino Hilliard, Frequency of primes.
EXAMPLE
The first 4 consecutive prime pairs are (2,3),(3,5),(5,7),(7,11). The differences + 1 are the primes 2,3,3,5, the first four entries in the sequence.
MAPLE
P:=proc(n) local cont, i, j, k, w; for i from 1 by 1 to n do k:=ithprime(i); w:=ithprime(i+1); if isprime(w-k+1) then print(w-k+1); fi; od; end: P(10000);
MATHEMATICA
Select[Differences[Prime[Range[200]]]+1, PrimeQ] (* Harvey P. Dale, Jul 02 2017 *)
PROG
(PARI) diffp1p2(n) = { local(p1, p2, y); for(x=1, n, p1=prime(x); p2=prime(x+1); y=(p2-p1)+1; if(isprime(y), print1(y", ") ) ) } \\ Cino Hilliard, May 23 2007
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Aug 02 2006
EXTENSIONS
Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar
STATUS
approved