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 A096915 #12 Aug 26 2019 10:40:26 %S A096915 3,3,7,3,3,7,3,3,7,3,3,7,7,23,7,3,3,11,3,11,11,3,3,11,7,3,7,3,3,7,3, %T A096915 17,7,7,3,7,3,3,7,13,11,11,3,3,7,3,23,7,19,3,13,3,23,7,7,3,7,7,3,7,3, %U A096915 11,11,3,3,19,3,3,11,13,29,7,3,3,7,43,3,7,7,11,11,3,11,19,3,3,7,3,23,7,37,41 %N A096915 Smallest prime which when appended to n produces a prime. %H A096915 T. D. Noe, <a href="/A096915/b096915.txt">Table of n, a(n) for n=1..10000</a> %e A096915 a(20)=11 because 11 is prime and 2011 is the smallest prime starting with 20 (2003 is not allowed). %t A096915 f[n_] := Block[{p = 2, a = IntegerDigits[n]}, While[ !PrimeQ[ FromDigits[ Join[a, IntegerDigits[ Prime[p]]] ]], p++ ]; Prime[p]]; Table[ f[n], {n, 92}] (* _Robert G. Wilson v_, Aug 20 2004 *) %t A096915 sp[n_]:=Module[{p=3},While[CompositeQ[n*10^IntegerLength[p]+p],p= NextPrime[ p]];p]; Array[sp,100] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 26 2019 *) %o A096915 (PARI) A096915(n) = { local(p=1); until(isprime(eval(Str(n,p=nextprime(p+2)))),);p} \\ _M. F. Hasler_, Jan 05 2009 %Y A096915 Cf. A088606, A089777 (the resulting primes). Records: A137177, A144593. %K A096915 nonn,base %O A096915 1,1 %A A096915 _Bodo Zinser_, Aug 18 2004 %E A096915 More terms from _Robert G. Wilson v_, Aug 20 2004 %E A096915 Cross-reference to indices of records corrected by _M. F. Hasler_, Jan 14 2009