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.

Showing 1-1 of 1 results.

A293042 Number of even permutations p of {1,...,n} such that p(i) is not i or i+1.

Original entry on oeis.org

1, 0, 0, 1, 1, 9, 47, 339, 2705, 24402, 244294, 2689669, 32297985, 420096147, 5883813373, 88287031271, 1412982765793, 24026200566404, 432554403678604, 8219863859175945, 164419973194802817, 3453229295483253853, 75978854506098365995, 1747670263607990439483
Offset: 0

Views

Author

Eric M. Schmidt, Sep 28 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := (Sum[(-1)^(n-k) k! Binomial[n+k, 2 k], {k, 0, n}] + (-1)^(n-1)* Floor[(n-1)/2])/2; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Feb 18 2019 *)

Formula

a(n) = (A000271(n) + (-1)^(n-1) * floor((n-1)/2))/2.
Showing 1-1 of 1 results.