login
A138472
Number of numbers less than n having a greater sum of digits.
5
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 15, 13, 11, 9, 7, 5, 3, 1, 0, 0, 21, 18, 15, 12, 9, 6, 3, 1, 0, 0, 26, 22, 18, 14, 10, 6, 3, 1, 0, 0, 30, 25, 20, 15, 10, 6, 3, 1, 0, 0, 33, 27, 21, 15, 10, 6, 3, 1, 0, 0, 35, 28, 21, 15, 10, 6, 3, 1, 0, 0, 36, 28, 21, 15, 10, 6, 3, 1, 0
OFFSET
0,11
COMMENTS
A138470(n) + A138471(n) + a(n) = n;
a(A067043(n)) = 0.
EXAMPLE
a(42)=#{7,8,9,16,17,18,19,25,26,27,28,29,34,35,36,37,38,39}=18.
MATHEMATICA
nn=90; With[{c=Table[{n, Total[IntegerDigits[n]]}, {n, 0, nn}]}, Table[ Count[Take[c, i], _?(#[[2]]>c[[i, 2]]&)], {i, nn}]] (* Harvey P. Dale, Sep 24 2012 *)
CROSSREFS
Cf. A007953.
Sequence in context: A021846 A201579 A071877 * A022964 A023450 A141726
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, Mar 19 2008
STATUS
approved