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.
%I A258190 #37 Nov 03 2021 06:15:08 %S A258190 11,3,7,19,211,13,17,419,421,23,127,29,31,233,37,139,41,43,47,149,151, %T A258190 53,157,59,61,163,67,269,71,73,277,79,181,83,487,89,191,193,97,199, %U A258190 101,103,107,109,2111,113,1117,3119,3121,1123,4127,1129,131,4133,137,4139,2141,2143,5147,11149,1151,1153,4157,4159,2161,1163,167,3169 %N A258190 Smallest prime not appearing earlier that ends with A045572(n). %C A258190 Using Dirichlet's theorem, we conclude that every term exists. So the sequence is a permutation of the odd primes other than 5. Indeed, an odd prime p other than 5 is either in its natural place in A045572 or appears earlier than that. %H A258190 Peter J. C. Moses, <a href="/A258190/b258190.txt">Table of n, a(n) for n = 1..1000</a> %H A258190 <a href="/index/Pri#piden">Index entries for primes involving decimal expansion of n</a> %F A258190 a(n) >= A045572(n). The equality holds iff A045572(n) is a prime that did not already appear as a(k), k<n. %p A258190 r:= -1: Used:= 'Used': %p A258190 for n from 1 to 1000 do %p A258190 r:= r+2; %p A258190 if r mod 5 = 0 then r:= r+2 fi; %p A258190 d:= 10^(1+ilog10(r)); %p A258190 for x from r by d do %p A258190 if isprime(x) and not assigned(Used[x]) then %p A258190 a[n]:= x; %p A258190 Used[x]:= true; %p A258190 break %p A258190 fi %p A258190 od %p A258190 od: %p A258190 seq(a[n],n=1..1000); # _Robert Israel_, May 27 2015 %o A258190 (PARI) \\with first line from A045572 by Charles R Greathouse IV %o A258190 a(n) = {n = 10*(n>>2)+[-1, 1, 3, 7][n%4+1]; my(d = digits(n),m = matrix(#d + 1, 2), w=0); m[1,2] = d[#d] - 10; for(i = 2, matsize(m)[1], m[i,1]=10^(i-2)*d[#d-i+2] + m[i-1,1]; if(m[i-1,1] == m[i,1],m[i,2]=m[i-1,2], j=m[i,1]==m[i-1,2]; while(!isprime(10^(i-1)*j+m[i,1]), j++); m[i,2]=10^(i-1)*j+m[i,1]));m[matsize(m)[1],2]} \\ _David A. Corneth_, May 25 2015 %o A258190 (Python) %o A258190 from sympy import isprime %o A258190 def aupton(terms): %o A258190 alst, aset = [], set() %o A258190 for n in range(1, terms+1): %o A258190 ending = 2*n - 1 + (n+1)//4 * 2 # A045572 %o A258190 i, pow10 = ending, 10**len(str(ending)) %o A258190 while i in aset or not isprime(i): i += pow10 %o A258190 alst.append(i); aset.add(i) %o A258190 return alst %o A258190 print(aupton(68)) # _Michael S. Branicky_, Nov 03 2021 %Y A258190 Cf. A000040, A045572, A258083, A338715. %K A258190 nonn,base %O A258190 1,1 %A A258190 _Vladimir Shevelev_, May 23 2015