login
A058852
Palindromes n such that n and n^2 have same digit sum.
4
0, 1, 9, 55, 99, 585, 595, 838, 999, 5995, 8668, 9999, 45954, 48384, 55755, 56665, 59895, 59995, 64846, 65656, 77977, 86968, 88488, 89398, 97479, 97579, 99099, 99199, 99999, 158851, 176671, 509905, 549945, 558855, 594495, 599995, 779977
OFFSET
1,3
LINKS
MAPLE
read("transforms") :
n := 1;
for i from 1 do
p := A002113(i) ;
if digsum(p) = digsum(p^2) then
printf("%d %d\n", n, p) ;
n := n+1 ;
end if;
end do: # R. J. Mathar, Sep 09 2015
MATHEMATICA
Select[Range[0, 78*10^4], PalindromeQ[#]&&Total[IntegerDigits[#]] == Total[ IntegerDigits[ #^2]]&] (* Harvey P. Dale, Sep 26 2021 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Dec 15 2000
STATUS
approved