OFFSET
4,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 4..1000
S. Kitaev, J. Remmel and M. Tiefenbruck, Marked mesh patterns in 132-avoiding permutations I, arXiv preprint arXiv:1201.6243 [math.CO], 2012-2014.
Index entries for linear recurrences with constant coefficients, signature (7,-17,17,-7,1).
FORMULA
From Vaclav Kotesovec, Nov 25 2012: (Start)
a(n) = (7*n+6)*F(2*n)/5 - (4*n+5)*F(2*n+1)/5 + 1, where F is Fibonacci number (A000045).
Recurrence: a(n) = 7*a(n-1) - 17*a(n-2) + 17*a(n-3) - 7*a(n-4) + a(n-5).
G.f.: x^4/(1-7*x+17*x^2-17*x^3+7*x^4-x^5). (End)
MATHEMATICA
CCC[t] = (1 - (1 - 4*t)^(1/2))/(2*t); NQ0[t, x] = ((1 + t - t*x) - ((1 + t - t*x)^2 - 4*t)^(1/2))/(2*t); NQ1[t, x] = 1/(1 - t*NQ0[t, x]); NQ2[t, x] = 1/(1 - t*NQ1[t, x]); NQ3[t, x] = 1/(1 - t*NQ2[t, x]); CoefficientList[Coefficient[Simplify[Series[NQ3[t, x], {t, 0, 20}]], x], t] (* Robert Price, Jun 06 2012 *)
CoefficientList[Series[1/(1 - 7*x + 17*x^2 - 17*x^3 + 7*x^4 - x^5), {x, 0, 50}], x] (* Vincenzo Librandi, Nov 25 2012 *)
PROG
(Magma) I:=[1, 7, 32, 122, 422]; [n le 5 select I[n] else 7*Self(n-1)-17*Self(n-2)+17*Self(n-3)-7*Self(n-4)+Self(n-5): n in [1..30]]; // Vincenzo Librandi, Nov 25 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert Price, Jun 06 2012
STATUS
approved