login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A326657 a(n) = 4*floor(n/2) + ceiling((n-1)^2/2). 2
1, 0, 5, 6, 13, 16, 25, 30, 41, 48, 61, 70, 85, 96, 113, 126, 145, 160, 181, 198, 221, 240, 265, 286, 313, 336, 365, 390, 421, 448, 481, 510, 545, 576, 613, 646, 685, 720, 761, 798, 841, 880, 925, 966, 1013, 1056, 1105, 1150, 1201, 1248, 1301, 1350, 1405, 1456, 1513, 1566, 1625, 1680 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) gives the maximum number of inversions in a permutation on n + 2 symbols consisting of a single n-cycle and 2 fixed points.
Sequence is a diagonal of A326296.
LINKS
FORMULA
a(n) = 4*floor(n/2) + ceiling((n-1)^2/2).
a(n) = A326296(2 + n, n) for n > 0.
From Colin Barker, Sep 15 2019: (Start)
G.f.: (1 - 2*x + 5*x^2 - 2*x^3) / ((1 - x)^3*(1 + x)).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n >= 4.
a(n) = (-1 + 5*(-1)^n + 4*n + 2*n^2) / 4.
(End)
E.g.f.: (1/4)*(5*exp(-x) + exp(x)*(-1 + 6*x + 2*x^2)). - Stefano Spezia, Sep 16 2019 after Colin Barker
PROG
(PARI) a(n) = 4*floor(n/2) + ceil((n-1)^2/2) \\ Andrew Howroyd, Sep 23 2019
(PARI) Vec((1 - 2*x + 5*x^2 - 2*x^3) / ((1 - x)^3*(1 + x)) + O(x^40)) \\ Andrew Howroyd, Sep 23 2019
CROSSREFS
Diagonal of A326296.
Sequence in context: A067245 A059176 A219978 * A303139 A322611 A030356
KEYWORD
nonn,easy
AUTHOR
M. Ryan Julian Jr., Sep 12 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 03:41 EDT 2024. Contains 371264 sequences. (Running on oeis4.)