login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A271371 Total number of inversions in all partitions of n into distinct parts. 3

%I #23 Apr 20 2023 15:44:22

%S 0,0,0,1,1,2,5,6,9,13,22,26,38,48,66,89,113,142,185,230,289,368,449,

%T 554,679,831,1003,1224,1474,1767,2117,2528,2996,3568,4206,4967,5855,

%U 6862,8027,9391,10943,12724,14785,17124,19807,22898,26376,30345,34893,40013

%N Total number of inversions in all partitions of n into distinct parts.

%H 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 Wikipedia, <a href="https://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)">Inversion (discrete mathematics)</a>

%F a(n) = Sum_{k>=1} A161680(k) * A008289(n,k).

%e a(3) = 1: 21.

%e a(4) = 1: 31.

%e a(5) = 2: 32, 41.

%e a(6) = 5: 42, 51, 321 (three inversions).

%p b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,

%p `if`(n=0, [1, 0], b(n, i-1, t)+`if`(i>n, 0,

%p (p-> p+[0, p[1]*t])(b(n-i, i-1, t+1)))))

%p end:

%p a:= n-> b(n$2, 0)[2]:

%p seq(a(n), n=0..60);

%t 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 Cf. A000009, A008289, A161680, A271370, A271372.

%K nonn

%O 0,6

%A _Alois P. Heinz_, Apr 05 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:53 EDT 2024. Contains 371906 sequences. (Running on oeis4.)