从 正整数 中除去所有平方因子后剩下的部分。例如, 的无平方因子部分是 6,因为 。对于 , 2, ..., 前几个是 1, 2, 3, 1, 5, 6, 7, 2, 1, 10, ... (OEIS A007913)。无平方因子部分函数可以在 Wolfram 语言 中实现为
SquarefreePart[n_Integer?Positive] := Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]}& /@ FactorInteger[n])
从 正整数 中除去所有平方因子后剩下的部分。例如, 的无平方因子部分是 6,因为 。对于 , 2, ..., 前几个是 1, 2, 3, 1, 5, 6, 7, 2, 1, 10, ... (OEIS A007913)。无平方因子部分函数可以在 Wolfram 语言 中实现为
SquarefreePart[n_Integer?Positive] := Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]}& /@ FactorInteger[n])
Weisstein, Eric W. "无平方因子部分。" 来自 MathWorld--Wolfram Web 资源。 https://mathworld.net.cn/SquarefreePart.html