OFFSET
1,1
FORMULA
a(n) = (3/81)*(10^(n+1) - 9*n - 10). - R. Piyo (nagoya314(AT)yahoo.com), Dec 10 2004
EXAMPLE
3+33+333+3333=a[4]=3702
MAPLE
a:=n->sum((10^(n-j)-1^(n-j))/3, j=0..n): seq(a(n), n=1..18); # Zerinvary Lajos, Jan 15 2007
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` Table[{k, Table[Apply[Plus, Table[k*(10^n-1)/9, {n, 1, m}]], {m, 1, 35}]}, {k, 1, 9}]
Table[3/9*Sum[10^i - 1, {i, n}], {n, 18}] (* Robert G. Wilson v, Nov 20 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 17 2004
STATUS
approved