login
A124695
Numbers n such that sum of digits of n^2 = sum of digits of (reverse n)^2.
0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31, 33, 37, 40, 41, 42, 44, 50, 51, 52, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 69, 70, 72, 73, 75, 76, 77, 80, 82, 85, 88, 89, 90, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106
OFFSET
1,3
EXAMPLE
E.g. 13^2 = 169 --> 1+6+9=16, 31^2 = 961 --> 9+6+1=16, so 13 is a member.
21^2 = 441 --> 4+4+1=9
12^2 = 144 --> 1+4+4=9
MAPLE
A004086 := proc(n) local nr, d; nr := convert(n, base, 10); d := nops(nr); sum( nr[d-k+1]*10^(k-1), k=1..d); end: A007953 := proc(n) local nr, d; nr := convert(n, base, 10); d := nops(nr); sum( nr[k], k=1..d); end: isA124695 := proc(n) if A007953(n^2) = A007953(A004086(n)^2) then RETURN(true); else RETURN(false); fi; end: for n from 0 to 60 do if isA124695(n) then printf("%d, ", n); fi; od; # R. J. Mathar, Jan 07 2007
MATHEMATICA
Select[Range[0, 120], Total[IntegerDigits[#^2]]==Total[IntegerDigits[ IntegerReverse[ #]^2]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 05 2019 *)
CROSSREFS
Sequence in context: A345201 A316530 A296864 * A005555 A128829 A342478
KEYWORD
nonn,base
AUTHOR
Mitchell O'Flaherty-Sproul (073208o(AT)acadiau.ca), Dec 26 2006
STATUS
approved