OFFSET
1,2
COMMENTS
For k > 0, numbers k such that the digits 12 followed by k occurrences of the digit 7 is prime (see Example section).
a(21) > 2*10^5.
LINKS
Makoto Kamada, Factorization of near-repdigit-related numbers.
Makoto Kamada, Search for 127w.
EXAMPLE
2 is in this sequence because (115*10^2 - 7)/9 = 1277 is prime.
Initial terms and associated primes:
a(1) = 1, 127;
a(2) = 2, 1277;
a(3) = 14, 1277777777777777;
a(4) = 26, 1277777777777777777777777777; etc.
MATHEMATICA
Select[Range[0, 100000], PrimeQ[(115*10^# - 7)/9] &]
Select[Range[87500], PrimeQ[FromDigits[PadRight[{1, 2}, #, 7]]]&]-2 (* Harvey P. Dale, May 27 2018 *)
PROG
(PARI) isok(k) = isprime((115*10^k - 7)/9); \\ Michel Marcus, Nov 14 2017
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Robert Price, Nov 13 2017
EXTENSIONS
a(20) from Robert Price, Feb 08 2020
STATUS
approved