OFFSET
1,1
COMMENTS
If the length of n > 9 is odd then the central number is not used in the calculation. So neither the left half nor the right half will contain the central digit. If the length of n is even, then all numbers are used. My guess is there are infinitely many of these numbers.
Number of n-digit terms for n=1..9: {4, 4, 33, 92, 1100, 3223, 37611, 130607, 1590017}. - Zak Seidov, Feb 19 2015
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
EXAMPLE
The left half of 23 is 2 which is prime. The right half is 3 which is also prime so 23 is a centrist prime. [Corrected by N. J. A. Sloane, Jan 12 2019]
PROG
(PARI) left(str, n) = /* Get the left n characters from string str */ { my(v, tmp, x); v =""; tmp = Vec(str); ln=length(tmp); if(n > ln, n=ln); for(x=1, n, v=concat(v, tmp[x]); ); return(v) }
right(str, n) = /* Get the right n characters from string str.*/ { my(v, ln, s, x); v =""; tmp = Vec(str); ln=length(tmp); if(n > ln, n=ln); s = ln-n+1; for(x=s, ln, v=concat(v, tmp[x]); ); return(v) }
/* Political primes, Centrist case */ rep(n) = { my(x, ln, y, lp, rp); forprime(x=2, n, y=Str(x); if(x > 9, ln=floor(length(y)/2), ln=1); lp = eval(left(y, ln)); rp = eval(right(y, ln)); if(isprime(lp)&& isprime(rp), print1(x", ") ) ) }
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Jan 22 2007
EXTENSIONS
Offset changed to 1 by Zak Seidov, Feb 19 2015
STATUS
approved