%I #3 May 30 2014 18:05:38
%S 1,20,90,259,602,1230,2298,4015,6655,10569,16198,24087,34900,49436,
%T 68646,93651,125761,166495,217602,281083,359214,454570,570050,708903,
%U 874755,1071637,1304014,1576815,1895464,2265912,2694670,3188843,3756165,4405035,5144554,5984563,6935682
%N Mahonian numbers T(n,6) (cf. A008302).
%C 45 years ago this was A000711, but it was dropped during the preparation of the 1973 Handbook of Integer Sequences.
%p g := proc(n, k) option remember; if k=0 then return(1) else if (n=1 and k=1) then return(0) else if (k<0 or k>binomial(n, 2)) then return(0) else g(n-1, k)+g(n, k-1)-g(n-1, k-n) end if end if end if end proc;
%p [seq(g(n,6),n=4..40)];
%Y Cf. A008302.
%K nonn
%O 4,2
%A _N. J. A. Sloane_, May 30 2014
|