Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #19 Apr 14 2024 02:35:36
%S 11582,17385,19317,20579,22931,42098,51895,52252,55259,60393,62192,
%T 62193,62680,64050,65324,71483,76391,76773,76805,77052,81139,86711,
%U 95661,100208,102032,113646,113892,113954,115251,124227,125218,125586,144165,144299,147619,147620
%N Numbers k such that prime(k), prime(k+1), prime(k+2), prime(k+3) and prime(k+4) all have the same last digit.
%H David A. Corneth, <a href="/A371390/a371390_1.gp.txt">PARI program</a>
%e 11582 is a term because prime(11582) = 123229, prime(11583) = 123239, prime(11584) = 123259, prime(11585) = 123269 with the same last digit 9.
%p nn:=15*10^4:d:=array(1..5):
%p for n from 1 to nn do:
%p for k from 1 to 5 do:
%p d[k]:=irem(ithprime(n+k-1),10):
%p od:
%p if d[1]=d[2] and d[1]=d[3] and
%p d[1]=d[4] and d[1]=d[5]
%p then
%p printf(`%d, `,n):
%p else
%p fi:
%p od:
%o (PARI) \\ See PARI link
%o (Python)
%o from itertools import count, islice
%o from sympy import nextprime
%o def A371390_gen(): # generator of terms
%o xlist, p = [2, 3, 5, 7, 1], 11
%o for k in count(1):
%o if len(set(xlist)) == 1:
%o yield k
%o p = nextprime(p)
%o xlist = xlist[1:]+[p%10]
%o A371390_list = list(islice(A371390_gen(),10)) # _Chai Wah Wu_, Apr 13 2024
%Y Cf. A000040, A007652, A107730, A129750.
%K nonn,base
%O 1,1
%A _Michel Lagneau_, Mar 20 2024