A381372
Smaller of two consecutive primes p and q, both ending with 3, such that q-p = 10n, or -1 if no such primes exist.
Original entry on oeis.org
283, 3413, 7253, 19333, 45893, 142993, 399283, 542603, 818723, 396733, 3240983, 10863973, 32788543, 8917523, 17652013, 92593183, 80935103, 92510963, 257789053, 481691513, 20831323, 47326693, 607010093, 1461724573, 387096133, 1496441363, 2298026803, 1855047163
Offset: 1
a(1) = 283, because 283 and 283 + 10 = 293 are two consecutive primes with the same last digit 3 and no smaller p has this property.
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.
Original entry on oeis.org
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
a(1) = 337, because 337 and 337 + 10 = 347 are two consecutive primes with the same last digit 7 and no smaller prime has this property.
-
a(n) = my(p=7); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
-
from sympy import nextprime, isprime
def A381510(n):
p = 17
while (q:=nextprime(p)):
if q-p == 10*n:
return p
p = q+9-(q+2)%10
while not isprime(p):
p += 10 # Chai Wah Wu, Mar 09 2025
A381511
Smaller of two consecutive primes p and q, both ending with 9, such that q - p = 10*n, or -1 if no such primes exist.
Original entry on oeis.org
139, 3089, 5749, 20809, 60539, 110359, 173359, 618719, 1294849, 838249, 6877109, 1895359, 11188759, 7621259, 35560009, 33803689, 124956059, 92801029, 142414669, 378043979, 229316459, 390932389, 1095750599, 995151679, 2174082649, 2603726969, 3402493709, 1997191249
Offset: 1
a(1) = 139, because 139 and 139 + 10 = 149 are two consecutive primes with the same last digit 9 and no smaller p has this property.
-
a(n) = my(p=9); while (!isprime(p) || ((nextprime(p+1)-p) != 10*n), p+=10); p; \\ Michel Marcus, Feb 25 2025
-
from sympy import isprime, nextprime
def A381511(n):
p = 19
while (q:=nextprime(p)):
if q-p == 10*n:
return p
p = q+9-(q%10)
while not isprime(p):
p += 10 # Chai Wah Wu, Mar 08 2025
Showing 1-3 of 3 results.