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!)
A326658 a(n) = 6*floor(n/2) + ceiling((n-1)^2/2). 2
1, 0, 7, 8, 17, 20, 31, 36, 49, 56, 71, 80, 97, 108, 127, 140, 161, 176, 199, 216, 241, 260, 287, 308, 337, 360, 391, 416, 449, 476, 511, 540, 577, 608, 647, 680, 721, 756, 799, 836, 881, 920, 967, 1008, 1057, 1100, 1151, 1196, 1249, 1296, 1351, 1400, 1457, 1508, 1567, 1620, 1681 (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 + 3 symbols consisting of a single n-cycle and 3 fixed points.
Sequence is a diagonal of A326296.
LINKS
FORMULA
a(n) = 6*floor(n/2) + ceiling((n-1)^2/2).
a(n) = A326296(3 + n, n) for n > 0.
From Colin Barker, Sep 13 2019: (Start)
G.f.: (1 - 2*x + 7*x^2 - 4*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) = (-3 + 7*(-1)^n + 8*n + 2*n^2) / 4.
(End)
MATHEMATICA
Table[6*Floor[n/2] + Ceiling[(n - 1)^2/2], {n, 80}] (* Wesley Ivan Hurt, Sep 13 2019 *)
PROG
(PARI) a(n) = 6*floor(n/2) + ceil((n-1)^2/2) \\ Andrew Howroyd, Sep 23 2019
(PARI) Vec((1 - 2*x + 7*x^2 - 4*x^3) / ((1 - x)^3*(1 + x)) + O(x^40)) \\ Andrew Howroyd, Sep 23 2019
CROSSREFS
Diagonal of A326296.
Sequence in context: A055661 A287334 A054312 * A106678 A222624 A214788
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 April 25 11:30 EDT 2024. Contains 371967 sequences. (Running on oeis4.)