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!)
A118470 Numbers k for which digitsum(k) + digitsum(k^2) + digitsum(k^3) = digitsum(k^4). 1
0, 162, 171, 351, 468, 558, 1620, 1710, 2106, 3321, 3510, 4023, 4680, 5121, 5247, 5544, 5580, 5868, 8001, 10008, 10071, 10224, 10305, 10503, 10818, 11025, 11241, 11511, 12321, 12654, 12888, 13239, 14004, 14301, 15471, 15876, 16011, 16200, 16218, 17100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
If x is a term, then so is 10*x. - Michael S. Branicky, Dec 25 2021
LINKS
J.W.L. (Jan) Eerland, Table of n, a(n) for n = 1..3721 (all terms < 10^7)
EXAMPLE
162 is a term because s(162) = 9, s(162^2) = 18, s(162^3) = 27, s(162^4) = 54 and 9 + 18 + 27 = 54.
MATHEMATICA
Select[Range[0, 20000], Sum[i*(DigitCount[ # ][[i]] + DigitCount[ #^2][[i]] + DigitCount[ #^3][[i]]), {i, 1, 9}] == Sum[i*DigitCount[ #^4][[i]], {i, 1, 9}] &] (* Stefan Steinerberger, May 04 2006 *)
s[n_] := Plus @@ IntegerDigits@n; Select[ Range[0, 16217], s@# + s[ #^2] + s[ #^3] == s[ #^4] &] (* Robert G. Wilson v, May 04 2006 *)
Parallelize[While[True, If[Total[IntegerDigits[n]]+Total[IntegerDigits[n^2]]+Total[IntegerDigits[n^3]]==Total[IntegerDigits[n^4]], Print[n]]; n++]; n] (* J.W.L. (Jan) Eerland, Dec 25 2021 *)
PROG
(PARI) is(n)=my(s=sumdigits); s(n)+s(n^2)+s(n^3) == s(n^4) \\ Anders Hellström, Sep 16 2015
(PARI) select(isA118470(n)={sumdigits(n)+sumdigits(n^2)+sumdigits(n^3) == sumdigits(n^4)}, [0..1000]) \\ J.W.L. (Jan) Eerland, Dec 25 2021
(Python)
def sd(n): return sum(map(int, str(n)))
def ok(n): return sd(n) + sd(n**2) + sd(n**3) == sd(n**4)
print([k for k in range(20000) if ok(k)]) # Michael S. Branicky, Dec 25 2021
CROSSREFS
Sequence in context: A232458 A214164 A273630 * A081724 A025374 A025365
KEYWORD
nonn,base
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 04 2006
EXTENSIONS
More terms from Joshua Zucker, May 11 2006
STATUS
approved

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 05:02 EDT 2024. Contains 371782 sequences. (Running on oeis4.)