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 A381373 #22 Mar 15 2025 18:44:34 %S A381373 1,1,2,7,72,3276,915848,2011878835,42723411900032, %T A381373 10608257527069388539,35808039364308986083608352, %U A381373 1828963737334508176477805993389490,1618534282345584818909121118371843799592960,28472613161534902071627567919297331348486838233018341 %N A381373 Sum over all partitions of [n] of n^j for a partition with j inversions. %H A381373 Alois P. Heinz, <a href="/A381373/b381373.txt">Table of n, a(n) for n = 0..41</a> %H A381373 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)">Inversion</a> %H A381373 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %F A381373 a(n) = Sum_{j>=0} n^j * A125810(n,j). %F A381373 a(n) = A381369(n,n). %F A381373 a(n) mod n = A062173(n) for n>=1. %F A381373 a(n) mod 2 = A120325(n+1) for n>=1. %p A381373 b:= proc(o, u, t, k) option remember; %p A381373 `if`(u+o=0, 1, `if`(t>0, b(u+o, 0$2, k), 0)+add(k^(u+j-1)* %p A381373 b(o-j, u+j-1, min(2, t+1), k), j=`if`(t=0, 1, 1..o))) %p A381373 end: %p A381373 a:= n-> b(n, 0$2, n): %p A381373 seq(a(n), n=0..15); %t A381373 b[o_, u_, t_, k_] := b[o, u, t, k] = %t A381373 If[u + o == 0, 1, If[t > 0, b[u + o, 0, 0, k], 0] + Sum[k^(u + j - 1)* %t A381373 b[o - j, u + j - 1, Min[2, t + 1], k], {j, If[t == 0, {1}, Range[o]]}]]; %t A381373 a[n_] := b[n, 0, 0, n]; %t A381373 Table[a[n], {n, 0, 15}] (* _Jean-François Alcover_, Mar 15 2025, after _Alois P. Heinz_ *) %Y A381373 Main diagonal of A381369. %Y A381373 Cf. A062173, A120325, A125810, A381427. %K A381373 nonn %O A381373 0,3 %A A381373 _Alois P. Heinz_, Feb 21 2025