cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A247884 Number of positive integers < 10^n divisible by their first digit.

Original entry on oeis.org

9, 41, 327, 3158, 31450, 314349, 3143320, 31433005, 314329833, 3143298089, 31432980631, 314329806030, 3143298060001, 31432980599686, 314329805996514, 3143298059964770, 31432980599647312, 314329805996472711, 3143298059964726682, 31432980599647266367
Offset: 1

Views

Author

Derek Orr, Sep 25 2014

Keywords

Comments

a(n)/10^n seems to converge to a number around .3143...
a(n)/10^n converges to 7129/22680. - Hiroaki Yamanouchi, Sep 26 2014

Crossrefs

Programs

  • 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

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

Extensions

a(9)-a(20) from Hiroaki Yamanouchi, Sep 26 2014