OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1000
EXAMPLE
Sum of digits of 8884 is 8 + 8 + 8 + 4 = 28. Its aliquot parts are 1, 2, 4, 2221, 4442 and their sum is 1 + 2 + 4 + 2 + 2 + 2 + 1 + 4 + 4 + 4 + 2 = 28.
MAPLE
with(numtheory): T:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do
y:=y+(x mod 10); x:=trunc(x/10); od; y; end:
P:=proc(q) local a, k, n; for n from 1 to q do a:=sort([op(divisors(n))]);
if T(n)=add(T(a[k]), k=1..nops(a)-1) then print(n); fi; od; end: P(10^6);
MATHEMATICA
Select[Range[10^4], Total@ IntegerDigits@ # == Total[Total@ IntegerDigits@ # & /@ Most@ Divisors@ #] &] (* Michael De Vlieger, Jun 14 2016 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Jun 14 2016
STATUS
approved