type/squarefree
check for a square-free integer
type/cubefree
check for a cube-free integer
Calling Sequence
Parameters
Description
Examples
type( expr, squarefree )
type( expr, cubefree )
expr
-
any Maple expression
The type( expr, squarefree ) command returns true if expr is a square-free integer, and false otherwise. An integer is square-free if it is not divisible by the square of any prime number.
An integer is square-free if, and only if, it is equal to its radical.
The type( expr, cubefree ) command returns true if expr is a cube-free integer, and false otherwise. An integer is cube-free if it is not divisible by the cube of any prime number.
type⁡6,'squarefree'
true
type⁡12,'squarefree'
false
type⁡12,'cubefree'
type⁡54,'cubefree'
The asymptotic natural density of square-free integers is equal to 6π2=1zeta⁡2.
N ≔ 100000:nops⁡select⁡type,seq⁡1..N,'squarefree'N
3039750000
evalf⁡%
lastexception
evalf⁡6Pi2
0.6079271016
Similarly, the asymptotic natural density of the cube-free integers is 1zeta⁡3.
N ≔ 10000:nops⁡select⁡type,seq⁡1..N,'cubefree'N
831910000
evalf⁡1Zeta⁡3
0.8319073727
See Also
integer
issqr
NumberTheory[Radical]
type
type/prime
Download Help Document
What kind of issue would you like to report? (Optional)