OFFSET
1,1
LINKS
David A. Corneth, PARI program
EXAMPLE
11582 is a term because prime(11582) = 123229, prime(11583) = 123239, prime(11584) = 123259, prime(11585) = 123269 with the same last digit 9.
MAPLE
nn:=15*10^4:d:=array(1..5):
for n from 1 to nn do:
for k from 1 to 5 do:
d[k]:=irem(ithprime(n+k-1), 10):
od:
if d[1]=d[2] and d[1]=d[3] and
d[1]=d[4] and d[1]=d[5]
then
printf(`%d, `, n):
else
fi:
od:
PROG
(PARI) \\ See PARI link
(Python)
from itertools import count, islice
from sympy import nextprime
def A371390_gen(): # generator of terms
xlist, p = [2, 3, 5, 7, 1], 11
for k in count(1):
if len(set(xlist)) == 1:
yield k
p = nextprime(p)
xlist = xlist[1:]+[p%10]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Mar 20 2024
STATUS
approved