%I #14 Jun 11 2023 11:41:10
%S 0,0,20,1168,27664,450048,6030140,72338144,811888600,8742609264,
%T 91700484132,945739871600,9647920866016,97729381122976,
%U 985430937715404,9906926101717184,99407643757824680,996242539625306512,9976235831375328564,99850100363120616144
%N Number of permutations of 2 indistinguishable copies of 1..n with exactly 3 adjacent element pairs in decreasing order.
%H Andrew Howroyd, <a href="/A151625/b151625.txt">Table of n, a(n) for n = 1..200</a>
%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (35, -511, 4099, -19997, 61981, -123645, 157041, -122094, 52812, -9720).
%F a(n) = 10^n - (2*n + 1)*6^n + binomial(2*n+1, 2)*3^n - binomial(2*n+1, 3). - _Andrew Howroyd_, May 07 2020
%F From _G. C. Greubel_, Sep 07 2022: (Start)
%F G.f.: 4*x^3*(5 + 117*x - 749*x^2 - 831*x^3 + 6768*x^4 - 5022*x^5 - 3888*x^6)/((1-x)^4*(1-3*x)^3*(1-6*x)^2*(1-10*x)).
%F E.g.f.: exp(10*x) - (1+12*x)*exp(6*x) + 9*x*(1+2*x)*exp(3*x) - x*(3 + 12*x + 4*x^2)*exp(x)/3. (End)
%t With[{B=Binomial}, Table[Sum[(-1)^j*B[2n+1,4-j]*B[j+1,2]^n, {j,4}], {n, 30}]] (* _G. C. Greubel_, Sep 07 2022 *)
%o (PARI) a(n) = {10^n - (2*n + 1)*6^n + binomial(2*n+1, 2)*3^n - binomial(2*n+1, 3)} \\ _Andrew Howroyd_, May 07 2020
%o (Magma)
%o A151625:= func< n | (&+[(-1)^j*Binomial(2*n+1,4-j)*Binomial(j+1,2)^n: j in [1..4]]) >;
%o [A151625(n): n in [1..30]]; // _G. C. Greubel_, Sep 07 2022
%o (SageMath)
%o @CachedFunction
%o def A151625(n): return sum((-1)^j*binomial(2*n+1,4-j)*binomial(j+1,2)^n for j in (1..4))
%o [A151625(n) for n in (1..30)] # _G. C. Greubel_, Sep 07 2022
%Y Column k=3 of A154283.
%K nonn
%O 1,3
%A _R. H. Hardin_, May 29 2009
%E Terms a(12) and beyond from _Andrew Howroyd_, May 07 2020
|