OFFSET
1,1
COMMENTS
Also, prime numbers p such that there exists a positive integer n with the property that p is the only prime satisfying prime(prime(n)) < p < prime(prime(n+1)).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
prime(3) + 2 = prime(4), hence prime(prime(3)+1) = 13 is in the sequence.
MATHEMATICA
a={}; For[n=1, n<210, n++, If[Prime[n+1]==Prime[n]+2, AppendTo[a, Prime[Prime[n]+1]]]]; a
Prime[#+1]&/@Select[Partition[Prime[Range[300]], 2, 1], #[[2]]-#[[1]] == 2&][[All, 1]] (* Harvey P. Dale, Feb 27 2021 *)
PROG
(PARI) pipprimes(n) = { for(x=1, n, c=0; p1 = prime(prime(x)); p2 = prime(prime(x+1)); forprime(y=p1+2, p2-2, c++); if(c==1, forprime(y=p1+2, p2-2, print1(y", "); ); ) ) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 31 2003
EXTENSIONS
Edited by Stefan Steinerberger, Jul 27 2007
STATUS
approved