[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A130901
a(n) = Sum_{k=1..9} floor(10^n / k).
2
1, 26, 281, 2827, 28288, 282895, 2828967, 28289681, 282896824, 2828968252, 28289682538, 282896825395, 2828968253967, 28289682539681, 282896825396824, 2828968253968252, 28289682539682538, 282896825396825395, 2828968253968253967, 28289682539682539681
OFFSET
0,2
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
Sequence in context: A006045 A022686 A200555 * A336732 A227332 A020925
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jun 08 2007
STATUS
approved