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!)
A155671 a(n) = 10^n - 9^n + 1^n. 4
1, 2, 20, 272, 3440, 40952, 468560, 5217032, 56953280, 612579512, 6513215600, 68618940392, 717570463520, 7458134171672, 77123207545040, 794108867905352, 8146979811148160, 83322818300333432, 849905364703000880 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n) is the number of numbers from 1 to 10^n containing a 1 in their decimal expansion. - Charles R Greathouse IV, Mar 25 2009
LINKS
FORMULA
G.f.: 1/(1-10*x)-1/(1-9*x)+1/(1-x).
E.g.f.: e^(10*x)-e^(9*x)+e^x.
a(n) = 19*a(n-1)-90*a(n-2)+72 with a(0)=1, a(1)=2. - Vincenzo Librandi, Jul 21 2010
a(n) = 20*a(n-1)-109*a(n-2)+90*a(n-3). - Wesley Ivan Hurt, Apr 21 2021
MATHEMATICA
Table[10^n-9^n+1, {n, 0, 20}] (* or *) LinearRecurrence[{20, -109, 90}, {1, 2, 20}, 20] (* Harvey P. Dale, Nov 05 2017 *)
PROG
(PARI) a(n)=10^n-9^n+1^n \\ Charles R Greathouse IV, Oct 16 2015
(Magma) [10^n-9^n+1: n in [0..25]]; // Wesley Ivan Hurt, Apr 21 2021
CROSSREFS
Equals A016189 + 1. See that entry for more information.
Sequence in context: A272568 A229727 A325409 * A303616 A231499 A217364
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Feb 01 2009
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 15 11:13 EDT 2024. Contains 372540 sequences. (Running on oeis4.)