A190187 Denominator of expression W_n occurring in analysis of bubble sort.
1, 1, 3, 6, 15, 90, 630, 720, 45360, 64800, 4989600, 59875200, 778377600, 1556755200, 163459296000, 373621248000, 44460928512000, 800296713216000, 15205637551104000, 3949516247040000, 6386367771463680000, 20071441567457280000, 3231502092360622080000, 5965850016665763840000, 1938901255416373248000000, 7201633234403672064000000
Offset: 1
Examples
1, 2, 10/3, 29/6, 97/15, 739/90, 6331/630, 8617/720, 633127/45360, 1037497/64800, ...
References
- D. E. Knuth, The Art of Computer Programming, Vol. 3, Section 5.2.2, p. 129.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..450
Crossrefs
Cf. A190186.
Programs
-
Maple
W:=proc(n) local t1,r,s; t1:=add( add(s!*r^(n-s), s=r+1..n), r=0..n-1); t1/n!; end;
-
Mathematica
Denominator[Table[n! + Sum[ Sum[s!*k^(n - s), {s, k + 1, n}], {k, 1, n - 1}]/n!, {n, 1, 50}]] (* G. C. Greubel, Dec 28 2017 *)
-
PARI
for(n=1,30, print1(denominator(1 + sum(k=1,n-1, sum(s=k+1, n, s!*k^(n-s)))/n!), ", ")) \\ G. C. Greubel, Dec 28 2017
Formula
W_n = Sum_{r=0..(n-1)}( Sum_{s=(r+1)..n} s!*r^(n-s) )/n!.
W_n = denominator(A190194(n)/n!).