"Is there a permutation engine online which will tell me how many elements of order 6 are in S_7 or A_7? (and similar questions) @wolframalphacom didn't seem up to the task."

def elts_of_order_Sn(n, k): a = 0 for s in SymmetricGroup(n): if s.order() == k: a += 1 return a def elts_of_order_An(n, k): a = 0 for s in AlternatingGroup(n): if s.order() == k: a += 1 return a

%time elts_of_order_Sn(7,6)

%time elts_of_order_An(7,6)