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!)
A065581 Smallest prime ending in exactly n 7's. 6
7, 277, 1777, 47777, 2477777, 16777777, 137777777, 577777777, 1777777777, 67777777777, 377777777777, 16777777777777, 17777777777777, 577777777777777, 2777777777777777, 157777777777777777 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Do[a = Table[7, {n} ]; k = 0; While[ b = FromDigits[ Join[ IntegerDigits[k], a]]; Mod[k, 10] == 7 || !PrimeQ[b], k++ ]; Print[b], {n, 1, 17} ]
k7[n_]:=Module[{c=FromDigits[PadRight[{}, n, 7]], k=0}, While[!PrimeQ[ k*10^n+ c], k++]; k*10^n+c]; Array[k7, 20] (* Harvey P. Dale, Jan 29 2013 *)
PROG
(PARI) { for (n=1, 100, t=10^n; b=7*(t - 1) / 9; d=0; while(!isprime(b + t*d), d++; if (d%10==7, d++)); write("b065581.txt", n, " ", b + t*d) ) } \\ Harry J. Smith, Oct 23 2009
CROSSREFS
Sequence in context: A332127 A222942 A289634 * A062646 A009503 A209889
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Nov 28 2001
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 April 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)