A066568 a(n) = n - sum of digits of n.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 63, 63, 63, 63, 63, 63
Offset: 0
Examples
a(23) = 23 - 2 - 3 = 18, a(2345) = 2345 - 2 - 3 - 4 - 5 = 2331.
Links
Crossrefs
Cf. A060028. - Reinhard Zumkeller, Mar 31 2010
Cf. A066568.
Programs
-
Magma
[n -(&+Intseq(n)): n in [1..100]]; // Vincenzo Librandi, Jan 04 2016
-
Mathematica
Table[n-Total[IntegerDigits[n]],{n,0,80}] (* Harvey P. Dale, Sep 19 2011 *)
-
PARI
a(n) = n - sumdigits(n); \\ Michel Marcus, Jan 04 2016
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Dec 21 2001
Comments