Say I have a number, like 60. Which has a prime factorization of $$[2,2,3,5]$$ What function would take in 60 and remove redundant factors? In this case, it should return 30
Edit: I did some more research, and the term I'm wording in looking for is reducing a number to its distinct factors
Lets define the following function:
Given $x = \prod_{i=1}^{n}p_{i}^{a_{i}}$ i.e. the prime factorisation of $x$
$f(x):= \prod_{i=1}^{n}p_{i}$
Is this what you were looking for?