A132285 Odd palindromes with an even number of digits.
11, 33, 55, 77, 99, 1001, 1111, 1221, 1331, 1441, 1551, 1661, 1771, 1881, 1991, 3003, 3113, 3223, 3333, 3443, 3553, 3663, 3773, 3883, 3993, 5005, 5115, 5225, 5335, 5445, 5555, 5665, 5775, 5885, 5995, 7007, 7117, 7227, 7337, 7447, 7557, 7667, 7777, 7887
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..555
Programs
-
Mathematica
monQ[n_]:=Module[{len=IntegerLength[n],idn=IntegerDigits[n]},EvenQ[ len] &&Take[idn,len/2]==Reverse[Take[idn,-len/2]]]; Select[Range[11,9999,2], monQ] (* Harvey P. Dale, Apr 18 2014 *)
-
PARI
isok(n) = {if (n % 2 == 0, return (0)); d = digits(n); if (#d % 2 == 1, return (0)); for (i=1, #d/2, if (d[i] != d[#d-i+1], return (0));); return (1);} \\ Michel Marcus, Nov 05 2013