OFFSET
0,3
COMMENTS
Almost all numbers contain any given sequence of digits (in any base) [Theorem 143 of Hardy and Wright]. a(7) = 5217031, more than 52% of the numbers < 10^7 contain any given nonzero decimal digit. - Frank Ellermann, May 30 2001
a(n) gives the number of integers from 0 to 10^n-1 which contain (at least) any one given decimal digit except 0. - Michael Taktikos, Aug 24 2004
These are the numerators of a(n)=(integral{x=0 to 0.2} (1-0.5*x)^n dx). E.g., a(3)=3439/20000. The denominators are b(n)=5*(n+1)*10^n. E.g., b(3)=20000. - Al Hakanson (hawkuu(AT)excite.com), Feb 22 2004
Binomial transforms of sequences defined by a(n)=(C+1)^n-C^n are the sequences (C+2)^n-(C+1)^n. The binomial transform of this here is in A016195, for example. - R. J. Mathar, Nov 27 2008
First differences are given in A088924. - M. F. Hasler, May 04 2015
REFERENCES
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 143
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..130
Alexander Bogomolny, Almost every integer has a digit 3 in it
John Elias, Illustration of Initial Terms
James Grime, 3 is everywhere, Numberphile video
Index entries for linear recurrences with constant coefficients, signature (19, -90).
FORMULA
G.f.: x/((1-9x)(1-10x)).
a(0) = 0, a(1) = 1, then a(n+1) = 9*a(n) + 10^n.
a(n) = 19*a(n-1) - 90*a(n-2), n > 1; a(0)=0, a(1)=1. - Philippe Deléham, Jan 01 2009
E.g.f.: e^(10*x) - e^(9*x). - Mohammad K. Azarian, Jan 14 2009
MATHEMATICA
f[n_]:=10^n-9^n; f[Range[0, 40]] (* Vladimir Joseph Stephan Orlovsky, Feb 14 2011 *)
PROG
(Magma) [10^n - 9^n: n in [0..20]]; // Vincenzo Librandi, Apr 26 2011
(Haskell)
a016189 n = 10 ^ n - 9 ^ n
a016189_list = 0 : zipWith (+) (map (* 9) a016189_list) a011557_list
-- Reinhard Zumkeller, Apr 03 2015
(PARI) a(n)=10^n-9^n \\ M. F. Hasler, May 04 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved