I was asked to look a sketch of paper about unitary divisors.
For definition see https://en.wikipedia.org/wiki/Unitary_divisor . Sage
code can be oneliner:
def unitary_divisors(n):
return [prod([p[0]^p[1] for p in f]) for f in Set(factor(n)).subsets()]
Would this be useful for others as a direct function of Sage? And if so,
should it be available both as unitary_divisors(60) and
60.unitary_divisors()? It would be consistent with prime_divisors(60)
and 60.prime_divisors(); OTOH our global namespace is already quite big.
--
Jori Mäntysalo