OFFSET
1,1
COMMENTS
For k > 1, numbers k such that the digit 1 followed by k-2 occurrences of the digit 6 followed by the digits 31 is prime (see Example section).
a(27) > 2*10^5.
LINKS
Makoto Kamada, Factorization of near-repdigit-related numbers.
Makoto Kamada, Search for 16w31.
EXAMPLE
4 is in this sequence because (5*10^4 - 107)/3 = 16631 is prime.
Initial terms and associated primes:
a(1) = 2, 131;
a(2) = 4, 16631;
a(3) = 5, 166631;
a(4) = 7, 16666631;
a(5) = 8, 166666631; etc.
MATHEMATICA
Select[Range[0, 100000], PrimeQ[(5*10^# - 107)/3] &]
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Robert Price, Jan 25 2017
STATUS
approved