A181510 Number of permutations of the multiset {1,1,2,2,3,3,...,n+1,n+1} avoiding the permutation patterns {132, 231, 2134}.
6, 18, 34, 54, 78, 106, 138, 174, 214, 258, 306, 358, 414, 474, 538, 606, 678, 754, 834, 918, 1006, 1098, 1194, 1294, 1398, 1506, 1618, 1734, 1854, 1978, 2106, 2238, 2374, 2514, 2658, 2806, 2958, 3114, 3274, 3438, 3606, 3778, 3954, 4134, 4318, 4506, 4698, 4894
Offset: 1
Examples
For n=1, the permutations of {1,1,2,2} avoiding the patterns {132, 231, 2134} are {1122, 1212, 1221, 2112, 2121, 2211}. For n=2, the permutations of {1,1,2,2,3,3} avoiding the patterns {132, 231, 2134} are {112233, 121233, 122133, 211233, 212133, 221133, 311223, 312123, 312213, 321123, 321213, 322113, 331122, 331212, 331221, 332112, 332121, 332211}.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..5000
- Lara K. Pudwell, Stacking Blocks and Counting Permutations, Mathematics Magazine, Vol. 83 (2010), pp. 297-302.
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Magma
A181510:= func< n | ((2*n+3)^2 -13)/2 >; [A181510(n): n in [1..60]]; // G. C. Greubel, Jan 21 2025
-
Mathematica
a[n_] := 2*n^2 + 6*n - 2; Array[a, 60] (* Amiram Eldar, Dec 23 2022 *) LinearRecurrence[{3,-3,1},{6,18,34},50] (* Harvey P. Dale, May 10 2023 *) ((2*Range[1,60]+3)^2 -13)/2 (* G. C. Greubel, Jan 21 2025 *)
-
PARI
a(n)=2*n^2+6*n-2 \\ Charles R Greathouse IV, Jun 17 2017
-
Python
def A181510(n): return (pow(2*n+3,2) -13)//2 print([A181510(n) for n in range(1,61)]) # G. C. Greubel, Jan 21 2025
Formula
a(n) = 2*n^2 + 6*n - 2.
From Bruno Berselli, Oct 29 2010: (Start)
G.f.: 2*x*(3-x^2)/(1-x)^3.
a(n) - 3*a(n-1) + 3*a(n-2) - a(n-3) = 0 for n > 3.
Sum_{n>=1} 1/a(n) = 2/3 + Pi*tan(sqrt(13)*Pi/2)/(2*sqrt(13)). - Amiram Eldar, Dec 23 2022
E.g.f.: 2*(exp(x)*(x^2 + 4*x - 1) + 1). - Elmo R. Oliveira, Nov 17 2024
Comments