OFFSET
0,2
COMMENTS
Is a(n) = 0 for any n > 0? If such an n exists, that n is a term of A000079 (cf. Greathouse, 2010).
All terms are congruent to 0 or 2 modulo 3, since if k is congruent to 1 modulo 3, 1000...0//k//00...01 is divisible by 3 and thus not prime.
a(n) <= A100026(n-1) with equality when a(n) is a palindrome. - Michel Marcus, Sep 11 2015
LINKS
Dana Jacobsen, Table of n, a(n) for n = 0..500
C. R. Greathouse IV, Primes of form 10^k + 1?, Physics Forums (message from Apr 6, 2010).
EXAMPLE
a(1) = 3, because 10001, 10101, and 10201 are composite and 10301 is prime.
a(6) = 29, because 29 is the smallest k such that 1000000//k//0000001 is prime. The decimal expansion of that prime is 1000000290000001.
MATHEMATICA
Table[k = 0; d = IntegerDigits[10^n]; While[! PrimeQ@ FromDigits@ Join[d, IntegerDigits@ k, Reverse@ d], k++]; k, {n, 0, 65}] (* Michael De Vlieger, Aug 26 2015 *)
PROG
(PARI) a(n) = x=10^n; k=0; while(!ispseudoprime(eval(Str(x, k, concat(Vecrev(Str(x)))))), k++); k
(Perl) use ntheory ":all"; for my $n (0..50) { my($t, $c)=(0); $t++ while $c=1 . 0 x $n . $t . 0 x $n . 1, !is_prob_prime($c); say "$n $t"; } # Dana Jacobsen, Oct 02 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Aug 23 2015
STATUS
approved