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.

A338765 Number of permutations p of [n] such that | |p(i) - p(i-1)| - |p(i+1) - p(i)| | <= 1.

Table of values

n a(n)
0 1
1 1
2 2
3 6
4 18
5 38
6 76
7 162
8 330
9 650
10 1272
11 2586
12 5262
13 10506
14 20856
15 41928
16 83684
17 165800
18 329310
19 653614
20 1303388
21 2584660
22 5139580
23 10210912
24 20288128
25 40224174
26 79824572
27 158316222
28 314272812

List of values

[1, 1, 2, 6, 18, 38, 76, 162, 330, 650, 1272, 2586, 5262, 10506, 20856, 41928, 83684, 165800, 329310, 653614, 1303388, 2584660, 5139580, 10210912, 20288128, 40224174, 79824572, 158316222, 314272812]