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 A051670 #23 Feb 07 2022 02:04:44 %S A051670 2,3,3,3,3,23,7,3,53,19,149,571,3,131,3,151,389,31,389,97,59,277,491, %T A051670 181,59,67,647,1117,797,433,41,367,29,487,719,283,347,97,1103,193,821, %U A051670 13,29,31,947,619,167,229,479,271,1217,79,2777,241,1361,751,83,4603,317 %N A051670 Smallest prime that concatenated with all previous terms of sequence forms a prime. %D A051670 A. Murthy, Smar. Notions J. Vol. 11, N. 1-2-3 Spring 2000 %H A051670 Paul Zimmermann, <a href="/A051670/b051670.txt">Table of n, a(n) for n = 1..1127</a> [First 200 terms from T. D. Noe] %e A051670 The 6th term of the sequence is 23 because that is smallest prime that when concatenated with previous terms 2, 3, 3, 3, 3, produces a prime (2333323). %t A051670 nxt[{lst_,n_}]:=Module[{id=IntegerDigits[lst],np=2},While[ !PrimeQ[ FromDigits[ Join[id, IntegerDigits[np]]]],np=NextPrime[np]];{FromDigits[ Join[id,IntegerDigits[np]]],np}]; Transpose[NestList[nxt,{2,2},60]] [[2]] (* _Harvey P. Dale_, May 25 2015 *) %t A051670 nxt[{l_,a_}]:=Module[{k=2},While[CompositeQ[l*10^IntegerLength[k]+ k],k= NextPrime[ k]];{l*10^IntegerLength[k]+k,k}]; NestList[nxt,{2,2},60][[All,2]] (* _Harvey P. Dale_, Aug 09 2020 *) %Y A051670 Cf. A048549 and A083758. %K A051670 nonn,base,nice %O A051670 1,1 %A A051670 _Felice Russo_, Dec 15 1999 %E A051670 Extended by _T. D. Noe_, May 01 2010