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.

A000179 Ménage numbers: a(0) = 1, a(1) = -1, and for n >= 2, a(n) = number of permutations s of [0, ..., n-1] such that s(i) != i and s(i) != i+1 (mod n) for all i.

Table of values

n a(n)
0 1
1 -1
2 0
3 1
4 2
5 13
6 80
7 579
8 4738
9 43387
10 439792
11 4890741
12 59216642
13 775596313
14 10927434464
15 164806435783
16 2649391469058
17 45226435601207
18 817056406224416
19 15574618910994665
20 312400218671253762
21 6577618644576902053
22 145051250421230224304
23 3343382818203784146955
24 80399425364623070680706
25 2013619745874493923699123

List of values

[1, -1, 0, 1, 2, 13, 80, 579, 4738, 43387, 439792, 4890741, 59216642, 775596313, 10927434464, 164806435783, 2649391469058, 45226435601207, 817056406224416, 15574618910994665, 312400218671253762, 6577618644576902053, 145051250421230224304, 3343382818203784146955, 80399425364623070680706, 2013619745874493923699123]