login
Numbers k such that R_(k+2) + 8*10^k is prime, where R_k = 11...1 is the repunit (A002275) of length k.
0

%I #17 Sep 08 2022 08:46:12

%S 0,1,12,16,33,37,42,6643,35157,63202,125292,200746

%N Numbers k such that R_(k+2) + 8*10^k is prime, where R_k = 11...1 is the repunit (A002275) of length k.

%C Also, numbers k such that (172*10^k - 1)/9 is prime.

%C Terms from Kamada.

%C a(13) > 250000.

%H Makoto Kamada, <a href="https://stdkmd.net/nrr/abaaa.htm">Near-repdigit numbers of the form ABAA...AA</a>.

%H Makoto Kamada, <a href="https://stdkmd.net/nrr/1/19111.htm#prime">Prime numbers of the form 1911...11</a>.

%H <a href="/index/Pri#Pri_rep">Index entries for primes involving repunits</a>.

%e For k=1, R_3 + 8*10^1 = 111 + 80 = 191 which is prime.

%t Select[Range[0, 250000], PrimeQ[(172*10^#-1)/9 ] &]

%o (Magma) [n: n in [0..300] | IsPrime((172*10^n-1) div 9)]; // _Vincenzo Librandi_, Apr 14 2015

%o (PARI) for(n=0,300,if(isprime((172*10^n-1)/9),print1(n,", "))) \\ _Derek Orr_, Apr 14 2015

%Y Cf. A002275.

%K more,hard,nonn

%O 1,3

%A _Robert Price_, Apr 13 2015