GroupCentralizer
GroupCentralizer[group, g] returns the centralizer of the element g in group.
Examples
GroupCentralizer[SymmetricGroup[4], Cycles[{{1, 2}}]]GroupCentralizer[AlternatingGroup[5], Cycles[{{1, 2, 3}}]]Please visit the official Wolfram Language Reference for more details.