A290929 p-INVERT of the positive integers, where p(S) = (1 - S)(1 - S^2).
1, 4, 13, 39, 114, 330, 948, 2703, 7655, 21554, 60389, 168468, 468199, 1296826, 3581185, 9862749, 27096216, 74277342, 203200986, 554869701, 1512575195, 4116813032, 11188568267, 30367047720, 82316338381, 222875101936, 602784607477, 1628612506131
Offset: 0
Links
- Clark Kimberling, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (7, -18, 23, -18, 7, -1)
Programs
-
Magma
I:=[1,4,13,39,114,330]; [n le 6 select I[n] else 7*Self(n-1)-18*Self(n-2)+23*Self(n-3)-18*Self(n-4)+7*Self(n-5)-Self(n-6): n in [1..40]]; // Vincenzo Librandi, Aug 20 2017
-
Mathematica
z = 60; s = x/(1 - x)^2; p = (1 - s)(1 - s^2); Drop[CoefficientList[Series[s, {x, 0, z}], x], 1] (* A000027 *) Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1] (* A290929 *) LinearRecurrence[{7, -18, 23, -18, 7, -1}, {1, 4, 13, 39, 114, 330}, 40] (* Vincenzo Librandi, Aug 20 2017 *)
-
PARI
Vec((1 - 3*x + 3*x^2 - 3*x^3 + x^4) / ((1 - 3*x + x^2)^2*(1 - x + x^2)) + O(x^30)) \\ Colin Barker, Aug 19 2017
Formula
a(n) = 7*a(n-1) - 18*a(n-2) + 23*a(n-3) - 18*a(n-4) + 7*a(n-5) - a(n-6).
G.f.: (1 - 3*x + 3*x^2 - 3*x^3 + x^4) / ((1 - 3*x + x^2)^2*(1 - x + x^2)). - Colin Barker, Aug 19 2017
Comments