OFFSET
1,1
COMMENTS
Might be called Prime Prime Intervals: the sequence of prime numbers that occur as 1 less than the difference between consecutive prime numbers. - Barry Forman, Oct 14 2016
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The first 4 consecutive prime pairs are (2,3),(3,5),(5,7),(7,11). The differences - 1 are the numbers 0,1,1,3. The first three of these are not prime so 3 is the first entry in the table.
MAPLE
P:= select(isprime, [2, seq(p, p=3..10^4, 2)]):
select(isprime, [seq(P[i]-P[i-1]-1, i=2..nops(P))]); # Robert Israel, Apr 18 2016
MATHEMATICA
Select[Last[#]-First[#]&/@Partition[Prime[Range[150]], 2, 1]-1, PrimeQ] (* Harvey P. Dale, Nov 18 2013 *)
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", ") ) ) }
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
Cino Hilliard, May 23 2007
STATUS
approved