OFFSET
1,2
LINKS
Patrick De Geest, Subsets of Palindromic Squares
MATHEMATICA
id[n_] := IntegerDigits[n]; palQ[n_] := FromDigits[Reverse[id[n]]] == n; t = {}; Do[If[palQ[x = n^2] && OddQ[Length[id[x]]], AppendTo[t, x]], {n, 101000}]; t (* Jayanta Basu, May 13 2013 *)
Select[Range[100000]^2, PalindromeQ[#] && EvenQ[Floor[Log[10, #]]] &] (* Alonso del Arte, Oct 11 2019 *)
PROG
(Scala) def isPalindromic(n: BigInt): Boolean = n.toString == n.toString.reverse
val squares = ((1: BigInt) to (1000000: BigInt)).map(n => n * n)
squares.filter(n => isPalindromic(n) && n.toString.length % 2 == 1) // Alonso del Arte, Oct 07 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved