login
A172209
Numbers n such that 18n - 5 and 18n + 5 are primes.
1
1, 2, 6, 8, 9, 13, 16, 19, 21, 23, 28, 34, 36, 41, 42, 44, 49, 54, 57, 58, 61, 72, 78, 82, 83, 86, 89, 96, 99, 104, 111, 113, 132, 133, 149, 152, 154, 167, 173, 177, 187, 201, 211, 218, 236, 237, 247, 251, 258, 266, 273, 278, 288, 296, 302, 307, 314, 316, 317, 322
OFFSET
1,2
LINKS
EXAMPLE
a(1)=1 because 18*1-5=13 is prime and 18*1+5=23 is prime.
MATHEMATICA
Select[Range[400], AllTrue[18#+{5, -5}, PrimeQ]&] (* Harvey P. Dale, Feb 25 2022 *)
PROG
(Magma) [n: n in [1..2500]|IsPrime(18*n-5) and IsPrime(18*n+5)] // Vincenzo Librandi, Dec 19 2010
(PARI) forprime(p=2, 1e4, if(p%18==5 & isprime(p-10), print1(p\18", "))) \\ Charles R Greathouse IV, May 25 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Definition corrected and 49 inserted by R. J. Mathar and D. S. McNeil, May 22 2010
Corrected by D. S. McNeil, May 22 2010
STATUS
approved