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.

A264082 Total number of inversions in all set partitions of [n].

This page as a plain text file.
%I A264082 #52 May 21 2025 10:52:06
%S A264082 0,0,0,1,10,74,504,3383,23004,160444,1154524,8594072,66243532,
%T A264082 528776232,4369175522,37343891839,329883579768,3008985817304,
%U A264082 28312886239136,274561779926323,2741471453779930,28159405527279326,297291626845716642,3223299667111201702
%N A264082 Total number of inversions in all set partitions of [n].
%C A264082 Each set partition is written as a sequence of blocks, ordered by the smallest elements in the blocks.
%H A264082 Alois P. Heinz, <a href="/A264082/b264082.txt">Table of n, a(n) for n = 0..573</a>
%H A264082 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)">Inversion (discrete mathematics)</a>
%H A264082 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%F A264082 a(n) = Sum_{k>0} k * A125810(n,k).
%e A264082 a(3) = 1: one inversion in 13|2.
%e A264082 a(4) = 10: one inversion in each of 124|3, 13|24, 13|2|4, 1|24|3, and two inversions in each of 134|2, 14|23, 14|2|3.
%p A264082 b:= proc(n, t) option remember; `if`(n=0, [1, 0], add((p-> p+
%p A264082       [0, p[1]*(j*t/2)])(b(n-j, t+j-1))*binomial(n-1, j-1), j=1..n))
%p A264082     end:
%p A264082 a:= n-> b(n, 0)[2]:
%p A264082 seq(a(n), n=0..23);  # _Alois P. Heinz_, Feb 20 2025
%t A264082 b[n_, t_] := b[n, t] = If[n == 0, {1, 0}, Sum[Function[p, p+{0, p[[1]]*(j*t/2)}][b[n-j, t+j-1]]*Binomial[n-1, j-1], {j, 1, n}]];
%t A264082 a[n_] := b[n, 0][[2]];
%t A264082 Table[a[n], {n, 0, 23}] (* _Jean-François Alcover_, May 21 2025, after _Alois P. Heinz_ *)
%Y A264082 Cf. A001809, A125810, A189052, A211606, A216239, A240796, A271370.
%K A264082 nonn
%O A264082 0,5
%A A264082 _Alois P. Heinz_, Apr 03 2016