0,11

19 is the only number for which n=[n mod Sum_of_digits(n)] + [Sum_of_digits(n) mod n]

Table of n, a(n) for n=0..84.

n=13 (13 mod 4)=1 (4 mod 13)=4 1+4=5

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);

Cf. A070635.

Sequence in context: A183526 A087343 A079586 * A141584 A287195 A179437

Adjacent sequences: A125957 A125958 A125959 * A125961 A125962 A125963

easy,nonn

Paolo P. Lava and Giorgio Balzarotti, Feb 06 2007, corrected May 09 2008

approved