OFFSET
0,3
LINKS
EXAMPLE
a(42)=#{0,1,2,3,4,5,10,11,12,13,14,20,21,22,23,30,31,32,40,41}=20.
MAPLE
digitsum:=proc(n) options operator, arrow: add(convert(n, base, 10)[j], j=1.. nops(convert(n, base, 10))) end proc: a:=proc (n) local ct, j: ct:=0: for j from 0 to n-1 do if digitsum(j) < digitsum(n) then ct:=ct+1 else end if end do: ct end proc: seq(a(n), n=0..75); # Emeric Deutsch, Mar 31 2008
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Mar 19 2008
STATUS
approved