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 A156770 #16 Oct 18 2022 01:26:55 %S A156770 1,3,7,9,11,17,21,29,39,43,49,51,53,81,91,99,103,123,127,133,153,191, %T A156770 227,231,241,249,253,273,281,291,293,311,323,333,337,339,341,347,359, %U A156770 377,387,397,427,429,431,441,443,453,461,467,471,481,489,493,523,541 %N A156770 1 followed by least greater integer such that concatenation of a(n-1) and a(n) is prime. %H A156770 Paolo P. Lava, <a href="/A156770/b156770.txt">Table of n, a(n) for n = 1..10000</a> %e A156770 The term immediately after 17 is 21 because 1721 is the first prime greater than 1717. %p A156770 cat2 := proc(a,b) a*10^(max(1,ilog10(b)+1))+b ; end: A156770 := proc(n) option remember ; local a; if n = 1 then 1; else for a from procname(n-1)+1 do if isprime( cat2(procname(n-1),a) ) then RETURN(a) ; fi; od: fi; end: seq(A156770(n),n=1..80) ; # _R. J. Mathar_, Feb 20 2009 %t A156770 nxt[n_]:=Module[{k=n+2,idn=IntegerDigits[n]},While[!PrimeQ[ FromDigits[ Join[ idn, IntegerDigits[ k]]]],k = k+2];k]; NestList[nxt,1,60] (* _Harvey P. Dale_, Jul 09 2015 *) %o A156770 (Python) %o A156770 from sympy import isprime %o A156770 from itertools import islice %o A156770 def agen(): %o A156770 an = 1 %o A156770 while True: %o A156770 yield an %o A156770 s, an = str(an), an+1 %o A156770 while not isprime(int(s+str(an))): an += 1 %o A156770 print(list(islice(agen(), 56))) # _Michael S. Branicky_, Oct 17 2022 %K A156770 nonn,base %O A156770 1,2 %A A156770 _Gerald Hillier_, Feb 15 2009, Mar 13 2010 %E A156770 More terms from _R. J. Mathar_, Feb 20 2009