%I #16 Jun 09 2024 18:05:39
%S 1,2,5,8,10,11,20,56,161,172,263,290,578,800,1166,3382,3848,7036,
%T 10487,12101,36211,94337,138737
%N Numbers k such that (379*10^k - 1)/9 is prime.
%C For k > 0, numbers k such that the digits 42 followed by k occurrences of the digit 1 is prime (see Example section).
%C a(24) > 2*10^5.
%H Makoto Kamada, <a href="https://stdkmd.net/nrr">Factorization of near-repdigit-related numbers</a>.
%H Makoto Kamada, <a href="https://stdkmd.net/nrr/prime/prime_difficulty.txt">Search for 421w</a>.
%e 2 is in this sequence because (379*10^2 - 1)/9 = 4211 is prime.
%e Initial terms and associated primes:
%e a(1) = 1, 421;
%e a(2) = 2, 4211;
%e a(3) = 5, 4211111;
%e a(4) = 8; 4211111111;
%e a(5) = 10, 421111111111; etc.
%t Select[Range[0, 100000], PrimeQ[(379*10^# - 1)/9] &]
%o (PARI) isok(k) = isprime((379*10^k - 1)/9); \\ _Michel Marcus_, Aug 07 2017
%Y Cf. A056654, A268448, A269303, A270339, A270613, A270831, A270890, A270929, A271269.
%K nonn,more,hard
%O 1,2
%A _Robert Price_, Aug 06 2017
%E a(23) from _Robert Price_, Feb 14 2020