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 right half of 13 is 3, which is prime. The left half is 1, which is not prime.

The right half of 113 is 3, which is prime. The left half is 1, which is not prime.

PROG

(PARI) /* Political primes, republican case. */ rep(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