The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A076609 Palindromic numbers with prime middle digit. 1

%I

%S 2,3,5,7,121,131,151,171,222,232,252,272,323,333,353,373,424,434,454,

%T 474,525,535,555,575,626,636,656,676,727,737,757,777,828,838,858,878,

%U 929,939,959,979,10201,10301,10501,10701,11211,11311,11511,11711,12221

%N Palindromic numbers with prime middle digit.

%C There are no such with an even number of digits.

%H Harvey P. Dale, <a href="/A076609/b076609.txt">Table of n, a(n) for n = 1..1000</a>

%e a(12)=272=2^4*17 is palindromic number and its middle digit 7 is prime, a(13)=323=17*19 is palindromic number and its middle digit 2 is prime, a(14)=333=3^2*37 is palindromic number and its middle digit 3 is prime.

%p ts_numprapal := proc(n) local ad,adr,midigit; ad := convert(n,base,10): adr := ListTools[Reverse](ad): if nops(ad) mod 2 = 0 then return 1; fi; midigit := op( (nops(ad)+1)/2,ad ): if (isprime( midigit )='true' and adr=ad) then return 0; else return 1; fi end: ts_num_pal := proc(i) if ts_numprapal(i) = 0 then return (i) fi end: anumpal := [seq(ts_num_pal(i), i=1..50000)]: anumpal;

%t pnpmdQ[n_]:=Module[{idn=IntegerDigits[n],len=IntegerLength[n]},OddQ[len] && PalindromeQ[n]&&PrimeQ[idn[[(len+1)/2]]]]; Select[Range[15000],pnpmdQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 08 2017 *)

%Y Cf. A032350.

%K easy,nonn,base

%O 1,1

%A _Jani Melik_, Oct 21 2002

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

Last modified November 27 07:28 EST 2021. Contains 349365 sequences. (Running on oeis4.)