# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a228325 Showing 1-1 of 1 %I A228325 #20 Oct 18 2022 10:45:23 %S A228325 3,3,7,7,9,7,9,9,11,13,17,13,19,23,23,19,21,23,31,27,29,37,33,37,31, %T A228325 33,29,33,39,37,37,51,43,49,39,37,39,47,43,49,53,43,49,47,47,49,51,61, %U A228325 51,51,53,61,81,71,57,57,79,61,81,67,63,63,67,69,69,73,79 %N A228325 a(n) is the smallest number m>n such that the concatenation nm is prime. %C A228325 Max Alekseyev (see link in A068695) shows that a(n) always exists. - _N. J. A. Sloane_, Nov 13 2020 %C A228325 Suggested by the existence question in A228323. %H A228325 Paul Tek, Table of n, a(n) for n = 1..10000 %H A228325 Index entries for primes involving decimal expansion of n %e A228325 12 is not prime but 13 is, so a(1)=3. %e A228325 23 is prime so a(2)=3. %e A228325 34, 35, 36 are not prime but 37 is, so a(3)=7. %t A228325 smc[n_]:=Module[{m=n+1},If[OddQ[n],m++];While[!PrimeQ[n*10^IntegerLength[ m]+ m],m=m+2];m]; Array[smc,70] (* _Harvey P. Dale_, Apr 30 2016 *) %o A228325 (Python) %o A228325 from sympy import isprime %o A228325 from itertools import count %o A228325 def a(n): return next(k for k in count(n+1) if isprime(int(str(n)+str(k)))) %o A228325 print([a(n) for n in range(1, 68)]) # _Michael S. Branicky_, Oct 18 2022 %Y A228325 Cf. A228323, A068695. %K A228325 nonn,base %O A228325 1,1 %A A228325 _N. J. A. Sloane_, Aug 20 2013 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE