login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A018800 Smallest prime that begins with n. 14
11, 2, 3, 41, 5, 61, 7, 83, 97, 101, 11, 127, 13, 149, 151, 163, 17, 181, 19, 2003, 211, 223, 23, 241, 251, 263, 271, 281, 29, 307, 31, 3203, 331, 347, 353, 367, 37, 383, 397, 401, 41, 421, 43, 443, 457, 461, 47, 487, 491, 503, 5101, 521, 53, 541, 557, 563, 571, 587, 59 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: If a(n) = (n concatenated with k) then k < n. - Amarnath Murthy, May 01 2002

a(n) always exists. Proof. Suppose n is L digits long, and consider the numbers between n*10^B and n*10^B+10^C, where B>C are both large compared with L. All such numbers begin with the digits of n. Using the upper and lower bounds on pi(x) from Theorem 1 of Rosser and Schoenfeld, it follows that for sufficiently large B and C, at least one of these numbers is a prime. QED - N. J. A. Sloane, Nov 14 2014

LINKS

Paolo P. Lava and T. D. Noe, Table of n, a(n) for n = 1..1000 (first 100 terms from Paolo P. Lava)

J. Barkley Rosser and Lowell Schoenfeld, Approximate formulas for some functions of prime numbers, Illinois J. Math. 6 (1962), pp. 64-94.

FORMULA

a(n) = prime(A085608(n)). - Michel Marcus, Oct 19 2013

MAPLE

f:= proc(n) local x0, d, r, y;

   if isprime(n) then return(n) fi;

   for d from 1 do

     x0:= n*10^d;

     for r from 1 to 10^d-1 by 2 do

       if isprime(x0+r) then

          return(x0+r)

       fi

     od

   od

end proc:

seq(f(n), n=1..100); # Robert Israel, Dec 23 2014

MATHEMATICA

Table[Function[d, FromDigits@ SelectFirst[ IntegerDigits@ Prime@ Range[10^4], Length@ # >= Length@ d && Take[#, Length@ d] == d &]][ IntegerDigits@ n], {n, 59}] (* Michael De Vlieger, May 24 2016, Version 10 *)

PROG

(Haskell)

import Data.List (isPrefixOf, find); import Data.Maybe (fromJust)

a018800 n = read $ fromJust $

            find (show n `isPrefixOf`) $ map show a000040_list :: Int

-- Reinhard Zumkeller, Jul 01 2015

(PARI) a(n{, base=10}) = for (l=0, oo, forprime (p=n*base^l, (n+1)*base^l-1, return (p))) \\ Rémy Sigrist, Jun 11 2017

CROSSREFS

Cf. A030665, A068164, A062584, A088781.

A164022 is the base-2 analog.

Cf. A258337.

Row n=1 of A262369.

Sequence in context: A077549 A089356 A113616 * A258337 A089566 A010191

Adjacent sequences:  A018797 A018798 A018799 * A018801 A018802 A018803

KEYWORD

nonn,base

AUTHOR

David W. Wilson

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 20 12:32 EST 2019. Contains 319330 sequences. (Running on oeis4.)