Cube-free part (source code)

= Cube-free part

= Cube-free kernel
{synonym}

For a positive <integer> $n=\prod_p p^{e_p}$, its <cube-free part> is $c=\prod_p p^{e_p\bmod3}$. Then $n=a^3c$ with $a=\prod_pp^{\lfloor e_p/3\rfloor}$, and no prime cube divides $c$. This decomposition is unique by <unique factorization>.

For example, $72=2^3\cdot3^2=2^3\cdot9$, so its <cube-free part> is $9$. This is different from the <radical of an integer>, which keeps each prime only once and gives $6$ here. Removing the cube factor simplifies cube roots and identifies <integers> whose ratio is a rational cube.