OFFSET
1,1
COMMENTS
Numbers k such that prime(k) - prime(k-1) = 2.
Numbers k such that A062301(k) is 1. - Vincenzo Librandi, Apr 04 2018
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A029707(n) + 1. - Juri-Stepan Gerasimov, Dec 16 2009
MAPLE
select(n->ithprime(n)-ithprime(n-1)=2, [$2..300]); # Muniru A Asiru, Apr 05 2018
MATHEMATICA
a = Flatten[Table[If[Prime[j] - Prime[j - 1] == 2, j, {}], {j, 2, 200}]]
Flatten[Position[Partition[Prime[Range[400]], 2, 1], _?(#[[2]]-#[[1]] == 2&), {1}, Heads->False]]+1 (* Harvey P. Dale, Jun 10 2014 *)
PROG
(Magma) [n: n in [1..450]| IsPrime(NthPrime(n)-2)]; // Vincenzo Librandi, Apr 04 2018
(PARI) for(n=3, 1e3, if(isprime(prime(n)-2), print1(n, ", "))); \\ Altug Alkan, Apr 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Jun 11 2005
EXTENSIONS
Incorrect comment removed by Charles R Greathouse IV, Mar 19 2010
More terms from Harvey P. Dale, Jun 10 2014
STATUS
approved