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!)
A268707 Smallest n-digit prime having at least n-1 digits equal to 9. 6
2, 19, 199, 1999, 49999, 199999, 2999999, 19999999, 799999999, 9199999999, 59999999999, 959999999999, 9919999999999, 59999999999999, 499999999999999, 9299999999999999, 99919999999999999, 994999999999999999, 9991999999999999999, 29999999999999999999 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Michel Lagneau, Michael De Vlieger and Robert G. Wilson v, Table of n, a(n) for n = 1..1225
MATHEMATICA
f[n_] := Block[{k = 0, p = {}, r = (10^n - 1), s = Range@ 10 - 10}, While[k < n - 0, AppendTo[p, Select[r + 10^k*s, PrimeQ]]; k++]; p = Min@ Flatten@ p]; Array[f, 20]
PROG
(PARI) a(n)=my(t=10^n-1, p); forstep(d=n-1, 0, -1, forstep(k=8, 1, -1, p=t-10^d*k; if(ispseudoprime(p), return(p)))); -1 \\ Charles R Greathouse IV, Mar 21 2016
CROSSREFS
Sequence in context: A218117 A145104 A114016 * A037071 A126039 A349256
KEYWORD
nonn,base
AUTHOR
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 March 19 03:33 EDT 2024. Contains 370952 sequences. (Running on oeis4.)