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.

A125858 a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks at least one of digits 1,2,3,4,5,6,7,8,9.

Original entry on oeis.org

10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 999637120, 9980041600, 99381289600, 985729744000, 9726841354240, 95404977568000, 929690189228800, 8999055703648000, 86532737999167360, 826798452380099200, 7852626768025993600
Offset: 1

Views

Author

Aleksandar M. Janjic and Milan Janjic, Feb 03 2007

Keywords

Comments

Note that the first eight terms of the sequence are powers of 10.

Crossrefs

Cf. A125630.

Programs

  • Maple
    f:=n->9*9^n-36*8^n+84*7^n-126*6^n+126*5^n-84*4^n+36*3^n-9*2^n+1;
  • Mathematica
    f[n_] := (9*9^n - 36*8^n + 84*7^n - 126*6^n + 126*5^n - 84*4^n + 36*3^n - 9*2^n + 1); Array[f, 18] (* Robert G. Wilson v, May 31 2009 *)
    (* or *) f[n_] := Sum[ -(-1)^k*Binomial[9, k] (10 - k)^n, {k, 9}]; Array[f, 18] (* Robert G. Wilson v, May 31 2009 *)
  • PARI
    vector(100, n, 9*9^n-36*8^n+84*7^n-126*6^n+126*5^n-84*4^n+36*3^n-9*2^n+1) \\ Colin Barker, Feb 23 2015

Formula

a(n) = 9*9^n-36*8^n+84*7^n-126*6^n+126*5^n-84*4^n+36*3^n-9*2^n+1.

Extensions

Incorrect g.f. removed by Georg Fischer, May 15 2019