[go: up one dir, main page]

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!)
A220094 Sum of the n-digit base-ten numbers whose digits are nonzero. 2
45, 4455, 404595, 36446355, 3280467195, 295244704755, 26572047342795, 2391484476085155, 215233604784766395, 19371024448062897555, 1743392200482566077995, 156905298044843094701955, 14121476824048587852317595, 1270932914164487290670858355 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For n >= 1, a(n) is the sum of the numbers with n digits in base ten whose digits belong to the set {1,2,3,4,5,6,7,8,9}.
If E_n is the set of the numbers with n digits in base ten whose digits belong to {1,2,3,4,5,6,7,8,9}, then card(E_n) = 9^n (see A001019).
REFERENCES
A. Ducos, Eléments fondamentaux de Math Sup, Ellipses, 1994, exercice 9, p. 126.
LINKS
Bernard Schott and Raymond Cordier, Question Comtet 16 (French mathematical forum les-mathematiques.net)
FORMULA
a(n) = 5*9^(n-1)*(10^n-1).
Generalization to base b with n-digit numbers whose digits belong to {1,2,...,b-1}: a_b(n) = (b/2)*(b-1)^(n-1)*(b^n-1).
From Colin Barker, Jan 04 2013: (Start)
a(n) = 99*a(n-1) - 810*a(n-2).
G.f.: 45*x/((9*x-1)*(90*x-1)). (End)
EXAMPLE
For n=2, in base ten, a(2) = 11+12+...+19+21+...+89+91+...+98+99 = 4455.
MAPLE
:= n->5*9^(n-1)*(10^n-1);
MATHEMATICA
Table[5*9^(n - 1)*(10^n - 1), {n, 20}] (* T. D. Noe, Dec 31 2012 *)
PROG
(PARI) a(n)=5*9^(n-1)*(10^n-1) \\ Charles R Greathouse IV, Jul 06 2017
CROSSREFS
Sequence in context: A113630 A143004 A004707 * A274603 A036521 A328356
KEYWORD
nonn,base,easy
AUTHOR
Bernard Schott, Dec 04 2012
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 August 29 00:59 EDT 2024. Contains 375508 sequences. (Running on oeis4.)