cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A125664 Numbers such that the right half of the digits form a prime and the left half do not.

This page as a plain text file.
%I A125664 #7 Dec 13 2021 09:10:24
%S A125664 12,13,15,17,42,43,45,47,62,63,65,67,82,83,85,87,92,93,95,97,102,103,
%T A125664 105,107,112,113,115,117,122,123,125,127,132,133,135,137,142,143,145,
%U A125664 147,152,153,155,157,162,163,165,167,172,173,175,177,182,183,185,187
%N A125664 Numbers such that the right half of the digits form a prime and the left half do not.
%C A125664 If the number of digits in the number is odd > 1, then the middle digit is ignored.
%H A125664 Michael S. Branicky, <a href="/A125664/b125664.txt">Table of n, a(n) for n = 1..10000</a>
%F A125664 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.
%e A125664 12 is the first number with this property.
%o A125664 (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",") ) ) }
%o A125664 (Python)
%o A125664 from sympy import isprime
%o A125664 def ok(n):
%o A125664     if n < 10: return False
%o A125664     s = str(n)
%o A125664     m = len(s)//2
%o A125664     return isprime(int(s[-m:])) and not isprime(int(s[:m]))
%o A125664 print([k for k in range(188) if ok(k)]) # _Michael S. Branicky_, Dec 13 2021
%Y A125664 Cf. A125524.
%K A125664 base,easy,nonn
%O A125664 1,1
%A A125664 _Cino Hilliard_, Jan 29 2007