cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A371390 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.

This page as a plain text file.
%I A371390 #24 Feb 21 2025 16:47:25
%S A371390 11582,17385,19317,20579,22931,42098,51895,52252,55259,60393,62192,
%T A371390 62193,62680,64050,65324,71483,76391,76773,76805,77052,81139,86711,
%U A371390 95661,100208,102032,113646,113892,113954,115251,124227,125218,125586,144165,144299,147619,147620
%N A371390 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 A371390 Robert Israel, <a href="/A371390/b371390.txt">Table of n, a(n) for n = 1..10000</a>
%H A371390 David A. Corneth, <a href="/A371390/a371390_1.gp.txt">PARI program</a>
%e A371390 11582 is a term because prime(11582) = 123229, prime(11583) = 123239, prime(11584) = 123259, prime(11585) = 123269 with the same last digit 9.
%p A371390 nn:=15*10^4:d:=array(1..5):
%p A371390 for n from 1 to nn do:
%p A371390  for k from 1 to 5 do:
%p A371390    d[k]:=irem(ithprime(n+k-1),10):
%p A371390  od:
%p A371390   if d[1]=d[2] and d[1]=d[3] and
%p A371390 d[1]=d[4] and d[1]=d[5]
%p A371390     then
%p A371390      printf(`%d, `,n):
%p A371390     else
%p A371390   fi:
%p A371390 od:
%o A371390 (PARI) \\ See PARI link
%o A371390 (Python)
%o A371390 from itertools import count, islice
%o A371390 from sympy import nextprime
%o A371390 def A371390_gen(): # generator of terms
%o A371390     xlist, p = [2, 3, 5, 7, 1], 11
%o A371390     for k in count(1):
%o A371390         if len(set(xlist)) == 1:
%o A371390             yield k
%o A371390         p = nextprime(p)
%o A371390         xlist = xlist[1:]+[p%10]
%o A371390 A371390_list = list(islice(A371390_gen(),10)) # _Chai Wah Wu_, Apr 13 2024
%Y A371390 Cf. A000040, A007652, A107730, A129750.
%K A371390 nonn,base
%O A371390 1,1
%A A371390 _Michel Lagneau_, Mar 20 2024