OFFSET
1,1
COMMENTS
For k > 1, numbers k such that the digit 4 followed by k-2 occurrences of the digit 2 followed by the digits 43 is prime (see Example section).
a(23) > 2*10^5.
LINKS
Makoto Kamada, Factorization of near-repdigit-related numbers.
Makoto Kamada, Search for 42w43.
EXAMPLE
2 is in this sequence because (38*10^2 + 187)/9 = 443 is prime.
Initial terms and associated primes:
a(1) = 2, 443;
a(2) = 3, 4243;
a(3) = 5, 422243;
a(4) = 6, 4222243;
a(5) = 9, 4222222243; etc.
MATHEMATICA
Select[Range[0, 100000], PrimeQ[38*10^# + 187)/9] &]
Select[Range[2, 100000], PrimeQ[100*FromDigits[PadRight[{4}, #-1, 2]]+43]&] (* Harvey P. Dale, Jan 16 2018 *)
PROG
(PARI) is(k) = ispseudoprime((38*10^k + 187)/9) \\ Iain Fox, Nov 24 2017
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Robert Price, Nov 24 2017
STATUS
approved