login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068695 Smallest number (not beginning with 0) that yields a prime when placed on the right of n. 11
1, 3, 1, 1, 3, 1, 1, 3, 7, 1, 3, 7, 1, 9, 1, 3, 3, 1, 1, 11, 1, 3, 3, 1, 1, 3, 1, 1, 3, 7, 1, 17, 1, 7, 3, 7, 3, 3, 7, 1, 9, 1, 1, 3, 7, 1, 9, 7, 1, 3, 13, 1, 23, 1, 7, 3, 1, 7, 3, 1, 3, 11, 1, 1, 3, 1, 3, 3, 1, 1, 9, 7, 3, 3, 1, 1, 3, 7, 7, 9, 1, 1, 9, 19, 3, 3, 7, 1, 23, 7, 1, 9, 7, 1, 3, 7, 1, 3, 1, 9, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Max Alekseyev (see link) shows that a(n) always exists. Note that although his argument makes use of some potentially large constants (see the comments in A060199), the proof shows that a(n) exists for all n. - N. J. A. Sloane, Nov 13 2020

Many numbers become prime by appending a one-digit odd number. Some numbers (such as 20, 32, 51, etc.) require a 2-digit odd number (A032352 has these). In the first 100000 values of n there are only 22 that require a 3-digit odd number (A091089). There probably are some values that require odd numbers of 4 or more digits, but these are likely to be very large. - Chuck Seggelin (barkeep(AT)plastereddragon.com), Dec 18 2003

LINKS

David W. Wilson, Table of n, a(n) for n=1..10000

Max Alekseyev, Given n, there is a k such that the concatenation n||k is a prime, Nov 09 2020

Index entries for primes involving decimal expansion of n

EXAMPLE

a(20)=11 because 11 is the minimum odd number which when appended to 20 forms a prime (201, 203, 205, 207, 209 are all nonprime, 2011 is prime).

MAPLE

T:=proc(t) local x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:

P:=proc(q) local a, k, n; for n from 1 to q do a:=10*n+1; k:=1;

while not isprime(a) do k:=k+1; a:=n*10^T(k)+k; od;

print(k); od; end: P(10^5); # Paolo P. Lava, Apr 10 2014

MATHEMATICA

d[n_]:=IntegerDigits[n]; t={}; Do[k=1; While[!PrimeQ[FromDigits[Join[d[n], d[k]]]], k++]; AppendTo[t, k], {n, 102}]; t (* Jayanta Basu, May 21 2013 *)

mon[n_]:=Module[{k=1}, While[!PrimeQ[n*10^IntegerLength[k]+k], k+=2]; k]; Array[mon, 110] (* Harvey P. Dale, Aug 13 2018 *)

PROG

(PARI) A068695=n->for(i=1, 9e9, ispseudoprime(eval(Str(n, i)))&&return(i)) \\ M. F. Hasler, Oct 29 2013

(Python)

from sympy import isprime

from itertools import count

def a(n): return next(k for k in count(1) if isprime(int(str(n)+str(k))))

print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Oct 18 2022

CROSSREFS

Cf. A032352 (a(n) requires at least a 2 digit odd number), A091089 (a(n) requires at least a 3 digit odd number).

Cf. also A060199, A228325, A336893.

Sequence in context: A073310 A174414 A046929 * A110787 A325982 A202338

Adjacent sequences: A068692 A068693 A068694 * A068696 A068697 A068698

KEYWORD

base,easy,nonn

AUTHOR

Amarnath Murthy, Mar 03 2002

EXTENSIONS

More terms from Chuck Seggelin (barkeep(AT)plastereddragon.com), Dec 18 2003

Entry revised by N. J. A. Sloane, Feb 20 2006

More terms from David Wasserman, Feb 14 2006

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 November 27 01:14 EST 2022. Contains 358362 sequences. (Running on oeis4.)