login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes of the form 20*R_k + 7, where R_k is the repunit (A002275) of length k.
2

%I #29 Jul 08 2021 06:20:13

%S 7,227,222222227,222222222222227,2222222222222222222222222227,

%T 2222222222222222222222222222222222222222222222222222222222222227

%N Primes of the form 20*R_k + 7, where R_k is the repunit (A002275) of length k.

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

%t Select[FromDigits /@ NestList["2" <> # &, "7", 10^3], PrimeQ] (* _Mikk Heidemaa_, Nov 18 2015 *)

%o (PARI) list(lim)=for(i=0,lim,m=20*(10^i-1)/9 + 7;if(isprime(m),print1(m," ,"))) \\ _Anders Hellström_, Nov 18 2015

%Y Cf. A002275, A056677 (corresponding k and count of digits 2 in a(n)), A099409.

%K nonn,base

%O 1,1

%A _Rick L. Shepherd_, Mar 26 2004