OFFSET
0,2
COMMENTS
a(2) = -1 (see second comment in A258372).
a(n) = -1 if n is of the form A000042(i)*10^j+A000042(i) for some j > i > 0, since the resulting number is divisible by A002275(k)//A000042(i).
a(n) = -1 if n is a term of A010785 with an even number of digits, since any number of the form 1..1d..d1..1 with an even number of digits d is divisible by 11.
From Chai Wah Wu, Nov 07 2019: (Start)
a(n) = -1 if n has an even number of digits and is a multiple of 11. In particular, a(n) = -1 if n is a term of A056524.
a(n) = -1 if n = (10^k+1)(10^m-1)/9 for some m > 0, k >= 0.
(End)
a(140) > 20000. - Hans Havermann, May 21 2022
LINKS
Hans Havermann, Table of n, a(n) for n = 0..139
EXAMPLE
a(0) = 1 since 101 is prime; a(1) refers to the prime 1111111111111111111.
a(124) = -1 because R_k//124//R_k is divisible by 125*10^k-1.
MATHEMATICA
Table[SelectFirst[Range[10^4], PrimeQ@ FromDigits@ Flatten@ {#, IntegerDigits@ n, #} &@ Table[1, {#}] &], {n, 0, 91}] /. k_ /; MissingQ@ k -> 0 (* Michael De Vlieger, Apr 25 2016, Version 10.2 *)
PROG
(PARI) a(n) = my(k=1); while(!ispseudoprime(eval(Str((10^k-1)/9, n, (10^k-1)/9))), k++); k
CROSSREFS
KEYWORD
sign,base
AUTHOR
Felix Fröhlich, Apr 23 2016
EXTENSIONS
a(35)-a(80) from Giovanni Resta, May 01 2016
Escape clausae value changed to -1 by N. J. A. Sloane, May 17 2022
STATUS
approved