(Translated by https://www.hiragana.jp/)
A133486 - OEIS
login
A133486
a(n) = Sum_{ k = 0 to n-1} ( subtract k modulo 9 from 9, multiply this by k-th power of 10 ).
1
9, 89, 789, 6789, 56789, 456789, 3456789, 23456789, 123456789, 9123456789, 89123456789, 789123456789, 6789123456789, 56789123456789, 456789123456789, 3456789123456789, 23456789123456789, 123456789123456789, 9123456789123456789, 89123456789123456789
OFFSET
1,1
LINKS
FORMULA
a(n) = sum(0 to n-1, ((9-(k % 9))*10^k) ).
EXAMPLE
a(6) = 9+80+700+6000+50000+400000 = 456789.
MATHEMATICA
Accumulate[Table[(9-Mod[n, 9])10^n, {n, 0, 20}]] (* or *) Table[FromDigits[PadLeft[ {}, n, Range[9]]], {n, 20}] (* Harvey P. Dale, May 08 2022 *)
PROG
(PARI) a(n) = sum(k=0, n-1, ((9-(k % 9))*10^k) ); \\ Michel Marcus, Aug 12 2013
CROSSREFS
Sequence in context: A217321 A111918 A064616 * A224760 A198967 A320093
KEYWORD
nonn
AUTHOR
Prashant Garg (prashant.garg1988(AT)yahoo.com), Nov 30 2007
EXTENSIONS
More terms from Michel Marcus, Aug 12 2013
STATUS
approved