The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A268706 Largest n-digit prime having at least n-1 digits equal to 7. 3
 7, 97, 977, 7877, 97777, 787777, 7877777, 77777747, 787777777, 8777777777, 79777777777, 777777779777, 7877777777777, 77777779777777, 778777777777777, 8777777777777777, 77797777777777777, 797777777777777777, 7777877777777777777, 97777777777777777777 (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..1268 MAPLE f:= proc(n)   local r, i, j, p;   r:= 7*(10^n-1)/9;   for p in sort([r, seq(seq(r + i*10^j, i=[\$(-7)..(-1), 1, 2]), j=0..n-1)], `>`) do     if isprime(p) then return p fi   od;   error("no prime found") end proc: map(f, [\$1..100]); # Robert Israel, Feb 24 2016 MATHEMATICA f[n_] := Block[{k = 0, p = {}, r = 7 (10^n - 1)/9, s = Range@ 10 - 8}, While[k < n, AppendTo[p, Select[r + 10^k*s, PrimeQ]]; k++]; p = Max@ Flatten@ p]; Array[f, 20] CROSSREFS Cf. A241100, A268702, A268703, A268704, A268705, A268707, A241206, A266146. Sequence in context: A289851 A242377 A178005 * A030540 A071361 A007810 Adjacent sequences:  A268703 A268704 A268705 * A268707 A268708 A268709 KEYWORD nonn,base AUTHOR Michel Lagneau, Michael De Vlieger and Robert G. Wilson v, Feb 11 2016 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.

Last modified January 27 17:58 EST 2020. Contains 331296 sequences. (Running on oeis4.)