The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A125665 Numbers such that both the left half of the digits and right half of the digits form a prime. 0

%I #11 Jan 15 2021 01:58:28

%S 2,3,5,7,22,23,25,27,32,33,35,37,52,53,55,57,72,73,75,77,202,203,205,

%T 207,212,213,215,217,222,223,225,227,232,233,235,237,242,243,245,247,

%U 252,253,255,257,262,263,265,267,272,273,275,277,282,283,285,287,292

%N Numbers such that both the left half of the digits and right half of the digits form a prime.

%C If the number of digits in the number is odd > 1, then the middle digit is ignored.

%F 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 22 is the first number with this property having more than 1 digit.

%t lhrhQ[n_]:=Module[{idn=IntegerDigits[n],len=Floor[IntegerLength[n]/2]}, And @@ PrimeQ[FromDigits/@{Take[idn,len],Take[idn,-len]}]]; Join[ {2,3,5,7}, Select[Range[300],lhrhQ]] (* _Harvey P. Dale_, Jul 05 2013 *)

%o (PARI) bothprime(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",") ) ) }

%Y Cf. A125525.

%K base,easy,nonn

%O 1,1

%A _Cino Hilliard_, Jan 29 2007

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 May 28 16:48 EDT 2024. Contains 372916 sequences. (Running on oeis4.)