cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

R. H. Hardin, Apr 20 2009

Keywords

Crossrefs

Column k=2 of A263789.

Programs

  • Magma
    [0,0] cat [2^(-5+n)*(4+2^n-4*n)*n: n in [2..30]]; // G. C. Greubel, Jun 02 2018
  • 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 *)
  • 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
    

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
a(n) = 14*a(n-1) - 76*a(n-2) + 200*a(n-3) - 256*a(n-4) + 128*a(n-5). - Wesley Ivan Hurt, Aug 04 2025

Extensions

More terms from Alois P. Heinz, Oct 26 2015