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 A271371 #23 Apr 20 2023 15:44:22 %S A271371 0,0,0,1,1,2,5,6,9,13,22,26,38,48,66,89,113,142,185,230,289,368,449, %T A271371 554,679,831,1003,1224,1474,1767,2117,2528,2996,3568,4206,4967,5855, %U A271371 6862,8027,9391,10943,12724,14785,17124,19807,22898,26376,30345,34893,40013 %N A271371 Total number of inversions in all partitions of n into distinct parts. %H A271371 Alois P. Heinz and Vaclav Kotesovec, <a href="/A271371/b271371.txt">Table of n, a(n) for n = 0..8950</a> (terms 0..5000 from Alois P. Heinz) %H A271371 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)">Inversion (discrete mathematics)</a> %F A271371 a(n) = Sum_{k>=1} A161680(k) * A008289(n,k). %e A271371 a(3) = 1: 21. %e A271371 a(4) = 1: 31. %e A271371 a(5) = 2: 32, 41. %e A271371 a(6) = 5: 42, 51, 321 (three inversions). %p A271371 b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0, %p A271371 `if`(n=0, [1, 0], b(n, i-1, t)+`if`(i>n, 0, %p A271371 (p-> p+[0, p[1]*t])(b(n-i, i-1, t+1))))) %p A271371 end: %p A271371 a:= n-> b(n$2, 0)[2]: %p A271371 seq(a(n), n=0..60); %t A271371 b[n_, i_, t_] := b[n, i, t] = If[n > i*(i+1)/2, 0, If[n == 0, {1, 0}, b[n, i-1, t] + If[i>n, 0, Function[p, p+{0, p[[1]]*t}][b[n-i, i-1, t+1]]]]]; a[n_] := b[n, n, 0][[2]]; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Feb 05 2017, translated from Maple *) %Y A271371 Cf. A000009, A008289, A161680, A271370, A271372. %K A271371 nonn %O A271371 0,6 %A A271371 _Alois P. Heinz_, Apr 05 2016