login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A125960
Sum of [n mod Sum_of_digits(n)] and [Sumr_of_digits(n) mod n].
0
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 5, 9, 9, 9, 9, 9, 19, 2, 3, 6, 8, 6, 11, 10, 9, 18, 18, 3, 7, 7, 9, 13, 11, 9, 17, 16, 15, 4, 6, 6, 8, 12, 9, 16, 14, 12, 23, 5, 9, 10, 13, 9, 15, 12, 21, 19, 17, 6, 12, 14, 9, 14, 21, 18, 15, 26, 24, 7, 15, 9, 13, 19, 15, 24, 21, 18, 31, 8, 9, 12, 17, 12, 20
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
Cf. A070635.
Sequence in context: A087343 A079586 A354953 * A141584 A287195 A179437
KEYWORD
easy,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Feb 06 2007, corrected May 09 2008
STATUS
approved