login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125664 Numbers such that the right half of the digits form a prime and the left half do not. 2
12, 13, 15, 17, 42, 43, 45, 47, 62, 63, 65, 67, 82, 83, 85, 87, 92, 93, 95, 97, 102, 103, 105, 107, 112, 113, 115, 117, 122, 123, 125, 127, 132, 133, 135, 137, 142, 143, 145, 147, 152, 153, 155, 157, 162, 163, 165, 167, 172, 173, 175, 177, 182, 183, 185, 187 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If the number of digits in the number is odd > 1, then the middle digit is ignored.
LINKS
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
Cf. A125524.
Sequence in context: A127354 A226099 A179512 * A262210 A074164 A076085
KEYWORD
base,easy,nonn
AUTHOR
Cino Hilliard, Jan 29 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 20:19 EDT 2024. Contains 374459 sequences. (Running on oeis4.)