OFFSET
0,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..100
Index entries for linear recurrences with constant coefficients, signature (11,-10,-1,11,-10).
FORMULA
A055642(a(n)) = n.
From Chai Wah Wu, Jan 14 2021: (Start)
a(n) = 11*a(n-1) - 10*a(n-2) - a(n-3) + 11*a(n-4) - 10*a(n-5) for n > 7.
G.f.: (-5*x^7 - 2*x^6 + 2*x^5 + 16*x^4 - 3*x^3 + 5*x^2 + 15*x + 1)/((x - 1)*(x + 1)*(10*x - 1)*(x^2 - x + 1)). (End)
EXAMPLE
a(1) = [10/1]+[10/2]+[10/3]+[10/4]+[10/5]+[10/6]+[10/7]+[10/8]+[10/9] = 10 + 5 + 3 + 2 + 2 + 1 + 1 + 1 + 1 = 26;
a(2) = [100/1]+[100/2]+[100/3]+[100/4]+[100/5]+[100/6]+[100/7]+[100/8]+[100/9] = 100 + 50 + 33 + 25 + 20 + 16 + 14 + 12 + 11 = 281.
MATHEMATICA
LinearRecurrence[{11, -10, -1, 11, -10}, {1, 26, 281, 2827, 28288, 282895, 2828967, 28289681}, 20] (* Harvey P. Dale, May 12 2024 *)
PROG
(Python)
def a(n): return sum(10**n//k for k in range(1, 10))
print([a(n) for n in range(20)]) # Michael S. Branicky, Jan 26 2021
(PARI) a(n) = sum(k=1, 9, 10^n\k); \\ Michel Marcus, Jan 26 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jun 08 2007
STATUS
approved