A321806 Number of zeros in palindromic strings of the form '123456789'|'1...0...1'|'987654321' whose decimal expansions are primes (palindromic).
7, 11, 19, 571, 829
Offset: 1
Examples
a(1)=7 because the decimal expansion of the palindromic string '123456789100000001987654321' (concatenation of the prefix '123456789', the central string '100000001', and the suffix '987654321') is prime (palindromic) containing 7 zeros. a(2)=11 as the decimal expansion of '1234567891000000000001987654321' is prime which contains 11 zeros.
Crossrefs
Cf. A002385.
Programs
-
Mathematica
ParallelMap[If[PrimeQ[1234567891*10^(#+10)+1987654321], #, Nothing] &, Range@1000]
-
Perl
use ntheory "is_prime"; do { print "$\n" if is_prime("1234567891" . "0"x$ . "1987654321") } for 1..2000; # Dana Jacobsen, Nov 21 2018
Comments