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.
%I A375623 #26 Sep 04 2024 15:57:09 %S A375623 0,0,0,2,12,30,72,132,240,380,600,870,1260,1722,2532,3080 %N A375623 Maximum value of F(p) = Sum (|i-j| - |p(i)-p(j)|)^2 where the sum is over all 1 <= i < j <= n, for all permutations p in the symmetric group S_n. %C A375623 The function F was defined by Dan Asimov on the Mailing list Math-Fun on Aug. 18, 2024. It can be considered as a sort of entropy of a permutation p like the function Sum_{k=1..n} (p(k)-k)^2 in A126972. %C A375623 The terms for even n seem to agree with A047928. %p A375623 F := proc(S) local i, j, M; %p A375623 M := 0; %p A375623 for j from 1 to nops(S) do %p A375623 for i from 1 to j-1 do %p A375623 M := M + (abs(i - j) - abs(S[i] - S[j]))^2 %p A375623 od: %p A375623 od: M end: %p A375623 a := proc(n) local P, m, u, mm; %p A375623 P := combinat:-permute(n); %p A375623 m := 0; %p A375623 for u in P do %p A375623 mm := F(u); %p A375623 if mm > m then m := mm fi; %p A375623 od: m end: %o A375623 (PARI) a375623(n) = my(m=0); forperm(n, p, m=max(m, sum(i=1,n, sum(j=1,i-1,(abs(i-j)-abs(p[i]-p[j]))^2)))); m \\ _Hugo Pfoertner_, Aug 22 2024 %Y A375623 Cf. A047928, A126972, A375625. %K A375623 nonn,more %O A375623 0,4 %A A375623 _W. Edwin Clark_, Aug 21 2024 %E A375623 a(11)-a(13) from _Hugo Pfoertner_, Aug 23 2024 %E A375623 a(14) from _Markus Sigg_, Aug 25 2024 %E A375623 a(15) from _Hugo Pfoertner_, Sep 04 2024