OFFSET
1,1
COMMENTS
a(n)/10^n seems to converge to a number around 0.3143...
a(n)/10^n converges to 7129/22680. - Hiroaki Yamanouchi, Sep 26 2014
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 1..100
Beyond Solutions Blog, Multiple of the first digit
J. J. O'Connor and E. F. Robertson, Pietro Mengoli
Index entries for linear recurrences with constant coefficients, signature (12,-21,9,12,-21,10).
FORMULA
G.f.: x*(9 - 67*x + 24*x^2 + 14*x^3 - 56*x^4 + 21*x^5 + 7*x^6 + 5*x^7)/((1 - x)^2*(1 + x)*(1 - 10*x)*(1 - x + x^2)). - Robert Israel, Mar 10 2025
PROG
(PARI)
a(n)=c=0; for(k=1, 10^n-1, d=digits(k); if(k%d[1]==0, c++)); c
n=1; while(n<10, print1(a(n), ", "); n++)
(Python)
count = 9 # Start with the first 9 digits
print(1, 9)
n = 2
while n < 101:
for a in range(1, 10):
count += 10**(n-1)//a
if 10**(n-1) % a != 0:
count += 1
print(n, count)
n += 1
# David Consiglio, Jr., Sep 26 2014
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Derek Orr, Sep 25 2014
EXTENSIONS
a(9)-a(20) from Hiroaki Yamanouchi, Sep 26 2014
STATUS
approved
