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!)
 A065581 Smallest prime ending in exactly n 7's. 6

%I

%S 7,277,1777,47777,2477777,16777777,137777777,577777777,1777777777,

%T 67777777777,377777777777,16777777777777,17777777777777,

%U 577777777777777,2777777777777777,157777777777777777

%N Smallest prime ending in exactly n 7's.

%H Harry J. Smith, <a href="/A065581/b065581.txt">Table of n, a(n) for n = 1..100</a>

%t 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} ]

%t 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 *)

%o (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

%Y Cf. A037067, A065590, A065821, A065580, A065582.

%K nonn,base

%O 1,1

%A _Robert G. Wilson v_, Nov 28 2001

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 February 28 01:49 EST 2020. Contains 332319 sequences. (Running on oeis4.)