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!)
A117224 Numbers for which the square and the cube have the same digital sum. 2

%I #18 Sep 08 2022 08:45:24

%S 0,1,3,6,10,24,28,30,37,60,64,81,87,93,100,114,118,136,163,219,222,

%T 228,234,240,252,258,267,273,276,280,291,294,300,312,316,342,343,370,

%U 384,387,433,447,468,469,477,478,507,525,534,537,541,585,591,600,606,613

%N Numbers for which the square and the cube have the same digital sum.

%H David A. Corneth, <a href="/A117224/b117224.txt">Table of n, a(n) for n = 1..10000</a>

%e 24 is in the sequence because 24^2 = 576, 24^3 = 13824 and 5 + 7 + 6 = 1 + 3 + 8 + 2 + 4.

%p a:=proc(n) local nn,nnn: nn:=convert(n^2,base,10): nnn:=convert(n^3,base,10): if sum(nn[i],i=1..nops(nn))=sum(nnn[j],j=1..nops(nnn)) then n else fi end: seq(a(n),n=0..620); # _Emeric Deutsch_, Apr 27 2006

%t scdsQ[n_]:=Total[IntegerDigits[n^2]]==Total[IntegerDigits[n^3]]; Select[ Range[ 0,700],scdsQ] (* _Harvey P. Dale_, Jan 23 2019 *)

%o (Magma) [n: n in [0..613] | &+Intseq(n^2) eq &+Intseq(n^3)]; // _Bruno Berselli_, Jun 28 2011

%o (PARI) is(n) = sumdigits(n^2) == sumdigits(n^3) \\ _David A. Corneth_, Sep 05 2020

%Y Cf. A058369.

%K nonn,easy,base

%O 1,3

%A Luc Stevens (lms022(AT)yahoo.com), Apr 21 2006

%E Offset corrected by _Arkadiusz Wesolowski_, Jun 28 2011

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 April 19 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)