OFFSET
1,1
COMMENTS
If the number of digits in the number is odd > 1, then the middle digit is ignored.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
FORMULA
The left half of an n-digit number is the first floor(n/2) digits. The right half of an n-digit number is the last floor(n/2) digits.
EXAMPLE
12 is the first number with this property.
PROG
(PARI) rightprime(n) = { local(x, ln, y, lp, rp); for(x=1, 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", ") ) ) }
(Python)
from sympy import isprime
def ok(n):
if n < 10: return False
s = str(n)
m = len(s)//2
return isprime(int(s[-m:])) and not isprime(int(s[:m]))
print([k for k in range(188) if ok(k)]) # Michael S. Branicky, Dec 13 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Jan 29 2007
STATUS
approved