OFFSET
1,2
COMMENTS
Near repdigit primes: concatenation of k-1 9's, one 8, and n 9's.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..1100
EXAMPLE
(10^1-1)*10^1-1 = 89 prime so a(1) = 1.
(10^10-1)*10^2-1 = 999999999899 prime so a(2) = 10.
MATHEMATICA
lnk[n_]:=Module[{k=1, c=10^n+1}, While[!PrimeQ[10^(n+k)-c], k++]; k]; Array[lnk, 80] (* Harvey P. Dale, Aug 12 2024 *)
PROG
(PARI) a(n) = {my(k=1); while (!ispseudoprime(10^(n+k) - 10^n - 1), k++); k; } \\ Michel Marcus, Sep 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jun 20 2012
STATUS
approved