login
A159710
Number of permutations of 1..n arranged in a circle with exactly 2 local maxima.
2
0, 0, 0, 0, 8, 80, 528, 2912, 14592, 69120, 316160, 1413632, 6223872, 27103232, 117067776, 502456320, 2145517568, 9122349056, 38644678656, 163186343936, 687144960000, 2886107922432, 12094385684480, 50577004298240, 211105074905088, 879606785638400
OFFSET
0,5
FORMULA
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
a(n) = 2^(-5+n)*(4+2^n-4*n)*n for n>1. - Colin Barker, Oct 26 2015
MATHEMATICA
LinearRecurrence[{14, -76, 200, -256, 128}, {0, 0, 0, 0, 8, 80, 528}, 30] (* Harvey P. Dale, Sep 23 2017 *)
Join[{0, 0}, Table[2^(-5+n)*(4+2^n-4*n)*n, {n, 2, 30}]] (* G. C. Greubel, Jun 02 2018 *)
PROG
(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
(PARI) a(n) = if(n==1, 0, 2^(-5+n)*(4+2^n-4*n)*n) \\ Colin Barker, Oct 26 2015
(Magma) [0, 0] cat [2^(-5+n)*(4+2^n-4*n)*n: n in [2..30]]; // G. C. Greubel, Jun 02 2018
CROSSREFS
Column k=2 of A263789.
Sequence in context: A190019 A342353 A055346 * A271555 A203290 A100472
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Apr 20 2009
EXTENSIONS
More terms from Alois P. Heinz, Oct 26 2015
STATUS
approved