login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest prime ending with exactly n identical digits.
1

%I #10 Aug 28 2016 19:03:17

%S 2,11,1777,23333,199999,2999999,19999999,577777777,1777777777,

%T 23333333333,311111111111,2111111111111,17777777777777,

%U 499999999999999,1333333333333333,23333333333333333

%N Smallest prime ending with exactly n identical digits.

%C By Dirichlet's theorem, there is a prime for each n. For the n in A004023, the smallest prime consists of all ones. - T. D. Noe, Oct 01 2007

%H T. D. Noe, <a href="/A131306/b131306.txt">Table of n, a(n) for n=1..200</a>

%e a(4)=23333 because 23333 is the smallest prime ending with exactly 4 identical digits.

%t sp[n_]:=Module[{k=1},While[!PrimeQ[k*10^IntegerLength[n]+n],k++];k*10^IntegerLength[n]+n]; Join[{2,11},Table[Min[sp/@FromDigits/@ Table[PadRight[{},i,n],{n,{1,3,7,9}}]],{i,3,20}]] (* _Harvey P. Dale_, Aug 28 2016 *)

%K base,nonn

%O 1,1

%A _Shyam Sunder Gupta_, Sep 29 2007