A380785 Smallest of two consecutive primes p and q, both ending with 1, such that q - p = 10n, or -1 if no such primes exist.
181, 13421, 4831, 25261, 95651, 43331, 175141, 1060781, 404851, 1648081, 2597981, 6085441, 22151281, 10270451, 25180321, 79817581, 84549821, 135045091, 306099181, 529811591, 164710681, 707429491, 965524181, 391995431, 428045491, 1516828721, 4272226951, 2337682591
Offset: 1
Examples
a(1) = 181, because 181 and 181 + 10 = 191 are two consecutive primes with the same last digit 1 and no smaller p has this property.
Programs
-
PARI
a(n) = my(p=11); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 20 2025