GAP:OrderStatisticsCumulative
(Redirected from GAP:CumulativeOrderStatistics)
Definition
Function type
The function takes as input a finite group.
Behavior
The function outputs the cumulative order statistics of the group. It gives, as a list sorted by increasing order of divisors of the order, the number of elements of the group whose order divides that number.
Method
Code
OrderStatisticsCumulative := function(G)
local L,D;
L := List(Set(G),Order);
D := DivisorsInt(Order(G));
return(List(D,x->Length(Filtered(L,y->x mod y = 0))));
end;;
Here is the paired version, that pairs a divisor and the number of elements whose order divides that divisor:
OrderStatisticsCumulativePaired := function(G)
local L,D;
L := List(Set(G),Order);
D := DivisorsInt(Order(G));
return(List(D,x->[x,Length(Filtered(L,y->x mod y = 0))]));
end;;