OFFSET
0,2
COMMENTS
Permutations avoiding 12-3 that contain the pattern 32-1 exactly once.
If Y is a 3-subset of an (2n+1)-set X then, for n>=1, a(n-1) is the number of (2n-1)-subsets of X having at least two elements in common with Y. - Milan Janjic, Dec 16 2007
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
T. Mansour, Restricted permutations by patterns of type 2-1, arXiv:math/0202219 [math.CO], 2002.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = a(n-1) + 4*n + 3 (with a(0)=0). - Vincenzo Librandi, Nov 17 2010
From L. Edson Jeffery, Oct 14 2012: (Start)
G.f.: x*(7-3*x)/(1-x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), n>=3, a(0)=0, a(1)=7, a(2)=18. (End)
E.g.f.: x*(7 + 2*x)*exp(x). - G. C. Greubel, Jul 15 2017
From Amiram Eldar, Feb 06 2022: (Start)
Sum_{n>=1} 1/a(n) = 46/75 - 2*log(2)/5.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/10 + log(2)/5 - 26/75. (End)
MAPLE
seq(n*(2*n+5), n=0..60); # G. C. Greubel, Oct 14 2019
MATHEMATICA
Table[n*(2*n+5), {n, 0, 60}] (* Vladimir Joseph Stephan Orlovsky, Nov 16 2008 *)
LinearRecurrence[{3, -3, 1}, {0, 7, 18}, 60] (* Harvey P. Dale, Nov 19 2021 *)
PROG
(PARI) a(n)=n*(2*n+5) \\ Charles R Greathouse IV, Jun 17 2017
(Magma) [n*(2*n+5): n in [0..60]]; // G. C. Greubel, Oct 14 2019
(Sage) [n*(2*n+5) for n in (0..60)] # G. C. Greubel, Oct 14 2019
(GAP) List([0..60], n-> n*(2*n+5) ); # G. C. Greubel, Oct 14 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved