login
A381510
Smaller of two consecutive primes p and q, both ending with 7, such that q - p = 10n, or -1 if no such primes exist.
0
337, 887, 4297, 33247, 31907, 124367, 218287, 1122287, 1964987, 1313467, 1468277, 7160227, 5518687, 16525757, 13626257, 71880637, 27915737, 17051707, 394059907, 566348087, 252314747, 472865287, 1289694257, 633418787, 1588640437, 944192807, 1391048047, 7059848287
OFFSET
1,1
EXAMPLE
a(1) = 337, because 337 and 337 + 10 = 347 are two consecutive primes with the same last digit 9 and no smaller p has this property.
PROG
(PARI) a(n) = my(p=7); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Jean-Marc Rebert, Feb 25 2025
STATUS
approved