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.

A064842 Maximal value of Sum_{i=1..n} (p(i) - p(i+1))^2, where p(n+1) = p(1), as p ranges over all permutations of {1, 2, ..., n}.

Table of values

n a(n)
1 0
2 2
3 6
4 18
5 36
6 66
7 106
8 162
9 232
10 322
11 430
12 562
13 716
14 898
15 1106
16 1346
17 1616
18 1922
19 2262
20 2642
21 3060
22 3522
23 4026
24 4578
25 5176
26 5826
27 6526
28 7282
29 8092
30 8962
31 9890
32 10882
33 11936
34 13058
35 14246
36 15506
37 16836
38 18242
39 19722
40 21282
41 22920
42 24642
43 26446
44 28338
45 30316

List of values

[0, 2, 6, 18, 36, 66, 106, 162, 232, 322, 430, 562, 716, 898, 1106, 1346, 1616, 1922, 2262, 2642, 3060, 3522, 4026, 4578, 5176, 5826, 6526, 7282, 8092, 8962, 9890, 10882, 11936, 13058, 14246, 15506, 16836, 18242, 19722, 21282, 22920, 24642, 26446, 28338, 30316]