login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A124695 Numbers n such that sum of digits of n^2 = sum of digits of (reverse n)^2. 0

%I #8 Jan 05 2019 15:01:44

%S 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,

%T 31,33,37,40,41,42,44,50,51,52,55,56,57,58,59,60,61,62,65,66,67,69,70,

%U 72,73,75,76,77,80,82,85,88,89,90,95,96,98,99,100,101,102,103,104,105,106

%N Numbers n such that sum of digits of n^2 = sum of digits of (reverse n)^2.

%e E.g. 13^2 = 169 --> 1+6+9=16, 31^2 = 961 --> 9+6+1=16, so 13 is a member.

%e 21^2 = 441 --> 4+4+1=9

%e 12^2 = 144 --> 1+4+4=9

%p 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

%t Select[Range[0,120],Total[IntegerDigits[#^2]]==Total[IntegerDigits[ IntegerReverse[ #]^2]]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 05 2019 *)

%K nonn,base

%O 1,3

%A Mitchell O'Flaherty-Sproul (073208o(AT)acadiau.ca), Dec 26 2006

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)