A151651 Number of permutations of 6 indistinguishable copies of 1..n with exactly 2 adjacent element pairs in decreasing order.
0, 225, 15606, 554931, 16689816, 477537957, 13457517066, 377519524263, 10576236506508, 296179535707065, 8293376986582302, 232217254675249371, 6502103768266128576, 182059062180981345549, 5097654923210293555314, 142734346723080681522255
Offset: 1
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..500
- Index entries for linear recurrences with constant coefficients, signature (45,-570,2822,-5481,4557,-1372).
Crossrefs
Column k=2 of A237252.
Programs
-
Magma
[(&+[(-1)^j*Binomial(6*n+1, j)*Binomial(8-j, 6)^n: j in [0..2]]): n in [1..30]]; // G. C. Greubel, Sep 12 2022
-
Mathematica
Table[Sum[(-1)^j*Binomial[6*n+1, j]*Binomial[8-j, 6]^n, {j,0,2}], {n, 30}] (* G. C. Greubel, Sep 12 2022 *)
-
PARI
a(n) = {28^n - (6*n + 1)*7^n + 3*n*(6*n + 1)} \\ Andrew Howroyd, May 06 2020
-
PARI
concat(0, Vec(9*x^2*(25 + 609*x - 2121*x^2 - 2401*x^3) / ((1 - x)^3*(1 - 7*x)^2*(1 - 28*x)) + O(x^20))) \\ Colin Barker, Jul 18 2020
-
SageMath
def A151651(n): return sum((-1)^j*binomial(6*n+1, j)*binomial(8-j, 6)^n for j in (0..2)) [A151651(n) for n in (1..30)] # G. C. Greubel, Sep 12 2022
Formula
a(n) = 28^n - (6*n + 1)*7^n + 3*n*(6*n + 1). - Andrew Howroyd, May 06 2020
From Colin Barker, Jul 18 2020: (Start)
G.f.: 9*x^2*(25 + 609*x - 2121*x^2 - 2401*x^3) / ((1 - x)^3*(1 - 7*x)^2*(1 - 28*x)).
a(n) = 45*a(n-1) - 570*a(n-2) + 2822*a(n-3) - 5481*a(n-4) + 4557*a(n-5) - 1372*a(n-6) for n>6. (End)
From G. C. Greubel, Sep 12 2022: (Start)
a(n) = Sum_{j=0..2} (-1)^j*binomial(6*n+1, j)*binomial(8-j, 6)^n.
E.g.f.: exp(28*x) - (1 + 42*x)*exp(7*x) + 3*x*(7 + 6*x)*exp(x). (End)
Extensions
Terms a(7) and beyond from Andrew Howroyd, May 06 2020