OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Digit.
EXAMPLE
For k = 174192, 1^3 + 7^3 + 4^3 + 1^3 + 9^3 + 2^3 = 1146, and 174192 = 152*1146; 1^2 + 7^2 + 4^2 + 1^2 + 9^2 + 2^2 = 152, and 174192 = 152*1146; 1 + 7 + 4 + 1 + 9 + 2 = 24, and 174192 = 24*7258.
MAPLE
with(numtheory):for n from 1 to 200000 do:l:=evalf(floor(ilog10(n))+1) : n0:=n:s1:=0:s2:=0: s3:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s1:=s1+u:s2:=s2+u^2:s3:=s3+u^3:od:if irem(n, s1)=0 and irem(n, s2)=0 and irem(n, s3)=0 then print(n):else fi:od:
MATHEMATICA
dsQ[n_]:=Module[{idn=IntegerDigits[n]}, Divisible[n, Total[idn]] && Divisible[n, Total[idn^2]] && Divisible[n, Total[idn^3]]]; Select[Range[50000], dsQ] (* Harvey P. Dale, Feb 24 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Apr 05 2010
STATUS
approved