The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228325 a(n) is the smallest number m>n such that the concatenation nm is prime. 5
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, 33, 29, 33, 39, 37, 37, 51, 43, 49, 39, 37, 39, 47, 43, 49, 53, 43, 49, 47, 47, 49, 51, 61, 51, 51, 53, 61, 81, 71, 57, 57, 79, 61, 81, 67, 63, 63, 67, 69, 69, 73, 79 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Max Alekseyev (see link in A068695) shows that a(n) always exists. - N. J. A. Sloane, Nov 13 2020
Suggested by the existence question in A228323.
LINKS
EXAMPLE
12 is not prime but 13 is, so a(1)=3.
23 is prime so a(2)=3.
34, 35, 36 are not prime but 37 is, so a(3)=7.
MATHEMATICA
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 *)
PROG
(Python)
from sympy import isprime
from itertools import count
def a(n): return next(k for k in count(n+1) if isprime(int(str(n)+str(k))))
print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Oct 18 2022
CROSSREFS
Sequence in context: A092474 A225851 A107470 * A327122 A071042 A128053
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Aug 20 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 07:28 EDT 2024. Contains 372760 sequences. (Running on oeis4.)