login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of permutations of 1..n arranged in a circle with exactly 2 local maxima.
2

%I #20 Sep 08 2022 08:45:44

%S 0,0,0,0,8,80,528,2912,14592,69120,316160,1413632,6223872,27103232,

%T 117067776,502456320,2145517568,9122349056,38644678656,163186343936,

%U 687144960000,2886107922432,12094385684480,50577004298240,211105074905088,879606785638400

%N Number of permutations of 1..n arranged in a circle with exactly 2 local maxima.

%H Alois P. Heinz, <a href="/A159710/b159710.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (14,-76,200,-256,128).

%F G.f.: -8*(2*x^2-4*x+1)*x^4 / ((4*x-1)^2*(2*x-1)^3). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009

%F a(n) = 2^(-5+n)*(4+2^n-4*n)*n for n>1. - _Colin Barker_, Oct 26 2015

%t LinearRecurrence[{14,-76,200,-256,128},{0,0,0,0,8,80,528},30] (* _Harvey P. Dale_, Sep 23 2017 *)

%t Join[{0,0}, Table[2^(-5+n)*(4+2^n-4*n)*n, {n, 2, 30}]] (* _G. C. Greubel_, Jun 02 2018 *)

%o (PARI) concat([0, 0, 0, 0], Vec(-8*(2*x^2-4*x+1)*x^4 / ((4*x-1)^2*(2*x -1)^3) + O(x^100))) \\ _Altug Alkan_, Oct 26 2015

%o (PARI) a(n) = if(n==1, 0, 2^(-5+n)*(4+2^n-4*n)*n) \\ _Colin Barker_, Oct 26 2015

%o (Magma) [0,0] cat [2^(-5+n)*(4+2^n-4*n)*n: n in [2..30]]; // _G. C. Greubel_, Jun 02 2018

%Y Column k=2 of A263789.

%K nonn,easy

%O 0,5

%A _R. H. Hardin_, Apr 20 2009

%E More terms from _Alois P. Heinz_, Oct 26 2015