OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Index entries for linear recurrences with constant coefficients, signature (6,-9,4).
FORMULA
G.f.: (1 - x - 3*x^2)/((1-4*x)*(1-x)^2). - R. J. Mathar, Mar 29 2009
a(n) = 6*a(n-1) -9*a(n-2) +4*a(n-3). - R. J. Mathar, Mar 29 2009
E.g.f.: x*exp(x) + exp(4*x). - G. C. Greubel, Mar 04 2020
EXAMPLE
a(0)=4^0+0 = 1, a(1)=4^1+1 = 5, a(2)=4^2+2 = 18, a(3)=4^3+3 = 67, ...
MAPLE
seq( 4^n+n, n=0..30); # G. C. Greubel, Mar 04 2020
MATHEMATICA
Table[4^n+n, {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, May 19 2011 *)
CoefficientList[Series[(1-x-3x^2)/((1-4x)(1-x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 16 2013 *)
LinearRecurrence[{6, -9, 4}, {1, 5, 18}, 30] (* Harvey P. Dale, Jun 02 2016 *)
PROG
(Magma) [4^n+n: n in [0..30]]; // Vincenzo Librandi, Jun 16 2013
(PARI) a(n)=4^n+n \\ Charles R Greathouse IV, Oct 07 2015
(Sage) [n+4^n for n in (0..30)] # G. C. Greubel, Mar 04 2020
(GAP) List([0..30], n-> n+4^n); # G. C. Greubel, Mar 04 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Mar 28 2009
EXTENSIONS
Corrected typo in a(22) from R. J. Mathar, Mar 29 2009
STATUS
approved