OFFSET
0,11
COMMENTS
19 is the only number for which n=[n mod Sum_of_digits(n)] + [Sum_of_digits(n) mod n]
EXAMPLE
n=13 (13 mod 4)=1 (4 mod 13)=4 1+4=5
MAPLE
P:=proc(n) local i, k, w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; print((i mod w)+(w mod i)); od; end: P(200);
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Feb 06 2007, corrected May 09 2008
STATUS
approved