A024102 a(n) = 9^n - n.
1, 8, 79, 726, 6557, 59044, 531435, 4782962, 43046713, 387420480, 3486784391, 31381059598, 282429536469, 2541865828316, 22876792454947, 205891132094634, 1853020188851825, 16677181699666552, 150094635296999103, 1350851717672992070, 12157665459056928781, 109418989131512359188
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..400
- Index entries for linear recurrences with constant coefficients, signature (11,-19,9).
Crossrefs
Programs
-
Magma
[9^n-n: n in [0..25]]; // Vincenzo Librandi, Jul 06 2011
-
Magma
I:=[1, 8, 79]; [n le 3 select I[n] else 11*Self(n-1)-19*Self(n-2)+9*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 17 2013
-
Mathematica
Table[9^n - n, {n, 0, 20}] (* or *) CoefficientList[Series[(1 - 3 x + 10 x^2) / ((1 - 9 x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 17 2013 *) LinearRecurrence[{11,-19,9},{1,8,79},30] (* Harvey P. Dale, Dec 25 2024 *)
-
PARI
a(n)=9^n-n \\ Charles R Greathouse IV, Oct 07 2015
Formula
From Vincenzo Librandi, Jun 17 2013: (Start)
G.f.: (1-3*x+10*x^2)/((1-9*x)(1-x)^2).
a(n) = 11*a(n-1) - 19*a(n-2) + 9*a(n-3). (End)
E.g.f.: exp(x)*(exp(8*x) - x). - Elmo R. Oliveira, Sep 09 2024
Comments