The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229127 Number of n-digit numbers containing the digit '0'. 2
1, 9, 171, 2439, 30951, 368559, 4217031, 46953279, 512579511, 5513215599, 58618940391, 617570463519, 6458134171671, 67123207545039, 694108867905351, 7146979811148159, 73322818300333431, 749905364703000879, 7649148282327007911, 77842334540943071199 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Other than the number 0 itself, numbers with leading zeros are not allowed, so the general formula is a(n)=9*10^(n-1)-9^n, which is simply the number of n-digit numbers that begin with a nonzero digit (9*10^(n-1)) minus the number of n-digit numbers consisting only of nonzero digits (9^n). (Because of the 1-digit number 0 itself, the general formula does not apply at n=1.)
Other than the number 1, and 9 which is a semiprime, the minimum number of possible prime factors with multiplicity of a(n) = 3, which holds for 171 = 3^2 * 19; 2439 = 3^2 * 271; 46953279 = 3^2 * 5217031; 617570463519 = 3^2 * 68618940391; 77842334540943071199 = 3^2 * 8649148282327007911. - Jonathan Vos Post, Sep 16 2013
LINKS
FORMULA
For n > 1, a(n) = 9*10^(n-1) - 9^n.
For n > 2, a(n) = 9*(a(n-1) + 10^(n-2)).
G.f.: x*(1-10*x+90*x^2)/((1-9*x)*(1-10*x)). - R. J. Mathar, Sep 14 2013
a(n) = A217094(n) - A217094(n-1), for n > 1. - Hieronymus Fischer, Dec 27 2013
E.g.f.: (9*exp(10*x) - 10*exp(9*x) + 10*x + 1)/10. - Stefano Spezia, Nov 15 2023
EXAMPLE
a(2) = 9, since there are 9 2-digit numbers that contain a '0'.
MATHEMATICA
LinearRecurrence[{19, -90}, {1, 9, 171}, 20] (* Stefano Spezia, Nov 15 2023 *)
CROSSREFS
Sequence in context: A121477 A055407 A083155 * A358620 A358959 A132897
KEYWORD
nonn,base,easy
AUTHOR
Jon E. Schoenfield, Sep 14 2013
EXTENSIONS
Example added and g.f. corrected by Hieronymus Fischer, Dec 27 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 17:21 EDT 2024. Contains 372738 sequences. (Running on oeis4.)