login
A166562
Numbers k such that prime(k) - k - 1 is prime.
1
4, 5, 9, 11, 15, 17, 19, 23, 25, 29, 33, 35, 39, 41, 45, 47, 51, 57, 67, 69, 71, 73, 77, 81, 83, 85, 107, 113, 131, 133, 145, 149, 155, 157, 165, 167, 169, 173, 175, 179, 187, 193, 195, 203, 215, 217, 225, 229, 233, 239, 245, 247, 269, 291, 293, 295, 329, 331, 337
OFFSET
1,1
LINKS
MAPLE
isA166562 := proc(n) isprime(ithprime(n)-n-1) ; end: for n from 1 to 500 do if isA166562(n) then printf("%d, ", n) ; fi; od: # R. J. Mathar, Oct 17 2009
MATHEMATICA
Select[Range[400], PrimeQ[Prime[#]-#-1]&] (* Harvey P. Dale, Jan 19 2021 *)
PROG
(PARI) n=0; forprime(p=2, 1e4, n++; if(isprime(p-n-1), print1(n", "))) \\ Charles R Greathouse IV, May 25 2011
(Magma) [ n: n in [1..340] | IsPrime(NthPrime(n)-n-1) ]; // Bruno Berselli, May 25 2011
CROSSREFS
Cf. A065890. - R. J. Mathar, Oct 17 2009
Sequence in context: A134921 A117870 A162698 * A031363 A118142 A193584
KEYWORD
nonn,less,easy
AUTHOR
EXTENSIONS
25 inserted, 39 inserted, 53 removed, etc. by R. J. Mathar, Oct 17 2009
STATUS
approved