A151647 Number of permutations of 5 indistinguishable copies of 1..n with exactly 2 adjacent element pairs in decreasing order.
0, 100, 5925, 167475, 3882250, 84320250, 1791011475, 37753995925, 793816473600, 16676797204500, 350257183908625, 7355694727665975, 154471515733316550, 3243914368665860350, 68122282848892857375, 1430568461732082827625, 30041941039388979651100
Offset: 1
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..500
- Index entries for linear recurrences with constant coefficients, signature (36,-390,1720,-3165,2556,-756).
Crossrefs
Column k=2 of A237202.
Programs
-
Magma
[(&+[(-1)^j*Binomial(5*n+1, j)*Binomial(7-j, 5)^n: j in [0..2]]): n in [1..30]]; // G. C. Greubel, Sep 12 2022
-
Mathematica
LinearRecurrence[{36,-390,1720,-3165,2556,-756},{0,100,5925,167475,3882250, 84320250}, 30] (* Harvey P. Dale, Nov 01 2021 *)
-
PARI
a(n) = {21^n -(5*n+1)*6^n +5*n*(5*n+1)/2} \\ Andrew Howroyd, May 06 2020
-
PARI
concat(0, Vec(25*x^2*(4 + 93*x - 273*x^2 - 324*x^3) / ((1 - x)^3*(1 - 6*x)^2*(1 - 21*x)) + O(x^20))) \\ Colin Barker, Jul 18 2020
-
SageMath
def A151647(n): return sum((-1)^j*binomial(5*n+1, j)*binomial(7-j, 5)^n for j in (0..2)) [A151647(n) for n in (1..30)] # G. C. Greubel, Sep 12 2022
Formula
a(n) = 21^n - (5*n + 1)*6^n + 5*n*(5*n + 1)/2. - Andrew Howroyd, May 06 2020
From Colin Barker, Jul 18 2020: (Start)
G.f.: 25*x^2*(4 + 93*x - 273*x^2 - 324*x^3)/((1 - x)^3*(1 - 6*x)^2*(1 - 21*x)).
a(n) = 36*a(n-1) - 390*a(n-2) + 1720*a(n-3) - 3165*a(n-4) + 2556*a(n-5) - 756*a(n-6) for n>6. (End)
From G. C. Greubel, Sep 12 2022: (Start)
a(n) = Sum_{j=0..2} (-1)^j*binomial(5*n+1, j)*binomial(7-j, 5)^n.
E.g.f.: exp(21*x) - (1 + 30*x)*exp(6*x) + (5/2)*x*(6 + 5*x)*exp(x). (End)
Extensions
Terms a(8) and beyond from Andrew Howroyd, May 06 2020