OFFSET
2,1
COMMENTS
If the length of n 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.
LINKS
Tony Padilla and Brady Haran, The Most Evil Number, Numberphile video (2018)
EXAMPLE
The left half of 29 is 2, which is prime. The right half is 9, which is not prime.
The left half of 211 is 2, which is prime. The right half is 1, which is not prime.
PROG
(PARI) /* Political primes, democratic case. */ dem(n) = { local(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
STATUS
approved