A141844 Expansion of (1+x)*(1+x^2)/((1-x)^2*(1+x+x^2)*(1-4*x)).
1, 6, 27, 113, 458, 1839, 7365, 29470, 117891, 471577, 1886322, 7545303, 30181229, 120724934, 482899755, 1931599041, 7726396186, 30905584767, 123622339093, 494489356398, 1977957425619, 7911829702505, 31647318810050, 126589275240231, 506357100960957
Offset: 0
Keywords
Examples
a(3) = 4*a(2) + A042968(3) = 4*27 + 5 = 113. a(13) = 4*a(12) + A042968(13) = 4*30181229 + 18 = 120724934.
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..1660
- Index entries for linear recurrences with constant coefficients, signature (5, -4, 1, -5, 4).
Crossrefs
Cf. A042968.
Programs
-
Magma
I:=[1,6,27,113,458]; [n le 5 select I[n] else 5*Self(n-1)-4*Self(n-2)+Self(n-3)-5*Self(n-4)+4*Self(n-5): n in [1..30]]; // Vincenzo Librandi, Jun 28 2017, Jul 28 2018
-
Mathematica
CoefficientList[Series[(1 + x) (1 + x^2) / ((1 - x)^2 (1 + x + x^2) (1 - 4 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 28 2017 *) Nest[Append[#, Block[{k = #[[-1, -1]] + 1}, While[Mod[k, 4] == 0, k++]; {4 #[[-1, 1]] + k, k}]] &, {{1, 1}}, 24][[All, 1]] (* Michael De Vlieger, Jun 30 2018 *) LinearRecurrence[{5, -4, 1, -5, 4}, {1, 6, 27, 113, 458}, 25] (* Robert G. Wilson v, Jul 28 2018 *)
-
PARI
Vec((1 + x)*(1 + x^2) / ((1 - x)^2*(1 - 4*x)*(1 + x + x^2)) + O(x^30)) \\ Colin Barker, Jun 26 2017
Formula
a(n) = 5*a(n-1) - 4*a(n-2) + a(n-3) - 5*a(n-4) + 4*a(n-5) for n>4. - Colin Barker, Jun 26 2017
Extensions
Corrected by Charlie Neder, Jun 22 2018
Edited by N. J. A. Sloane, Aug 23 2018, merging old entry A288571 with this one.
Comments