OFFSET
1,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
W. Y. C. Chen, A. Y. L. Dai and R. D. P. Zhou, Ordered Partitions Avoiding a Permutation of Length 3, arXiv preprint arXiv:1304.3187, 2013. See Th. 1.1.
Index entries for linear recurrences with constant coefficients, signature (7,-18,20,-8).
FORMULA
G.f.: x^3*(5-8*x)/((1-x)*(1-2*x)^3). - Bruno Berselli, Jun 17 2013
MATHEMATICA
Table[(n^2 / 8 + 3 n / 8 - 2) 2^n + 3, {n, 40}] (* or *) CoefficientList[Series[x^2 (5 - 8 x) / ((1 - x) (1 - 2 x)^3), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 18 2013 *)
LinearRecurrence[{7, -18, 20, -8}, {0, 0, 5, 27}, 40] (* Harvey P. Dale, Jul 10 2018 *)
PROG
(Magma) [(n^2/8+3*n/8-2)*2^n+3: n in [1..35]]; // Vincenzo Librandi, Jun 18 2013
(Magma) I:=[0, 0, 5, 27]; [n le 4 select I[n] else 7*Self(n-1)-18*Self(n-2)+20*Self(n-3)-8*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 18 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 09 2013
STATUS
approved