%I #35 Jan 15 2023 01:45:06
%S 0,2,8,14,27,63,1167,1694,2361,116619
%N Numbers k such that 20*R_k + 7 is prime, where R_k = 11...1 is the repunit (A002275) of length k.
%C Also numbers k such that (2*10^(k+1)+43)/9 is prime.
%H Makoto Kamada, <a href="https://stdkmd.net/nrr/2/22227.htm#prime">Prime numbers of the form 22...227</a>.
%H <a href="/index/Pri#Pri_rep">Index entries for primes involving repunits</a>
%F a(n) = A099409(n+1) - 1. - _Robert Price_, Jan 30 2015
%t Do[ If[ PrimeQ[20*(10^n - 1)/9 + 7], Print[n]], {n, 0, 5000}]
%t Flatten[Position[Table[FromDigits[PadLeft[{7},n,2]],{n,5000}], _?PrimeQ]]-1 (* _Harvey P. Dale_, May 01 2012 *)
%t Select[Range[0, 2500], PrimeQ[20*(10^n - 1)/9 + 7]&] (* _Mikk Heidemaa_, Nov 28 2015 *)
%Y Cf. A002275, A093167, A099409.
%K hard,nonn,more
%O 1,2
%A _Robert G. Wilson v_, Aug 10 2000
%E a(10) from Kamada link entered by _Michael S. Branicky_, Jan 14 2023