OFFSET
1,1
COMMENTS
For k > 1, numbers k such that the digit 3 followed by k-2 occurrences of the digit 9 followed by the digits 13 is prime (see Example section).
a(24) > 2*10^5.
LINKS
Makoto Kamada, Factorization of near-repdigit-related numbers.
Makoto Kamada, Search for 39w13.
EXAMPLE
5 is in this sequence because 4*10^5 - 87 = 399913 is prime.
Initial terms and associated primes:
a(1) = 2, 313;
a(2) = 5, 399913;
a(3) = 7, 39999913;
a(4) = 13, 39999999999913;
a(5) = 16, 39999999999999913; etc.
MATHEMATICA
Select[Range[2, 100000], PrimeQ[4*10^#-87] &]
PROG
(PARI) isok(n) = isprime(4*10^n - 87); \\ Indranil Ghosh, Mar 22 2017
(Python)
from sympy import isprime
def ok(n): return 1 if isprime(4*10**n - 87) else 0 # Indranil Ghosh, Mar 22 2017
CROSSREFS
KEYWORD
nonn,more,hard
AUTHOR
Robert Price, Mar 22 2017
STATUS
approved