IsSquareFree
Tests whether n has no repeated prime factors.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Square-free integerMathWorldSquarefreeWikidataQ50706OEISA005117Wolfram LanguageSquareFreeQ!IsSquareFree(n)tests whether has no repeated prime factor.SageMath
is_squarefree(n)Juliais_squarefree(ZZ(n))Rustis_square_free(n)IsSquareFree(f)for a polynomial , whether it has no repeated irreducible factor.SageMath
is_squarefree(f)Juliais_squarefree(ZZ(f))Rustis_square_free(f)IsSquareFree(f, x)whether has no repeated factor as a polynomial in alone.Typed signatures
| Type | Package | Applies |
|---|---|---|
(expression | number | quadratic_integer, any*) -> boolean | number-theoryreplaces compute-engine | always |
(integer) -> boolean | compute-engine | always |
Details
- An integer is squarefree if it is divisible by no perfect square other than 1.
- Every prime is squarefree; 1 is vacuously squarefree.
- Equivalent to . See MoebiusMu.
- Returns False unless is provably squarefree.
Examples
5 more kept as data, checked against the oraclesScope #
Properties #
About
| Examples | 31 |
|---|---|
| Checked against | Wolfram Language 27 agree2 differSageMath 14 agree1 differ7 errorSymPy 18 agree4 differ3 errormathlib4 10 agree4 errorJulia 12 agree3 errorRust 10 agree4 error |
| Crosswalk | WikipediaMathWorldWikidataOEISWolfram LanguageSageMathJuliaRust |
Implementation
mapped
sagepackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.tsEvery exponent of the factorization is 1.
mapped
sympypackages/oracle/src/mappings.tsmapped
mathlib4packages/oracle/src/mappings.tsSquarefree on the natural numbers, so Squarefree 0 is false and a negative n fails to typecheck.
See also: MoebiusMu, FactorInteger