A291007 p-INVERT of (1,1,1,1,1,...), where p(S) = 1 - S - S^2 - S^3 - S^4 - S^5.
1, 3, 9, 27, 81, 242, 720, 2137, 6337, 18789, 55715, 165232, 490058, 1453493, 4311025, 12786359, 37923789, 112480082, 333610072, 989469949, 2934716101, 8704215281, 25816251319, 76569665176, 227101665034, 673571786617, 1997779058053, 5925309279179
Offset: 0
Links
- Clark Kimberling, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6,-13,14,-7,2).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1 -3*x +4*x^2 -2*x^3 +x^4)/(1 -6*x +13*x^2 -14*x^3 +7*x^4 -2*x^5) )); // G. C. Greubel, Jun 01 2023 -
Mathematica
z = 60; s = x/(1 - x); p = 1 - s - s^2 - s^3 - s^4 - s^5; Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A000012 *) Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A291007 *) LinearRecurrence[{6,-13,14,-7,2},{1,3,9,27,81},30] (* Harvey P. Dale, Apr 07 2019 *)
-
PARI
Vec((1 -3*x +4*x^2 -2*x^3 +x^4)/(1 -6*x +13*x^2 -14*x^3 +7*x^4 - 2*x^5) + O(x^30)) \\ Colin Barker, Aug 23 2017
-
SageMath
def A291007_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( (1 -3*x +4*x^2 -2*x^3 +x^4)/(1 -6*x +13*x^2 -14*x^3 +7*x^4 -2*x^5) ).list() A291007_list(40) # G. C. Greubel, Jun 01 2023
Formula
a(n) = 6*a(n-1) - 13*a(n-2) + 14*a(n-3) - 7*a(n-4) + 2*a(n-5) for n >= 6.
G.f.: (1 - 3*x + 4*x^2 - 2*x^3 + x^4) / (1 - 6*x + 13*x^2 - 14*x^3 + 7*x^4 - 2*x^5). - Colin Barker, Aug 23 2017
Comments