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.
type6,squarefree
true
type12,squarefree
false
type12,cubefree
type54,cubefree
The asymptotic natural density of square-free integers is equal to 6π2=1ζ2.
N≔100000:nopsselecttype,seq1..N,squarefreeN
3039750000
evalf%
lastexception
evalf6π2
0.6079271016
Similarly, the asymptotic natural density of the cube-free integers is 1ζ3.
N≔10000:nopsselecttype,seq1..N,cubefreeN
831910000
evalf1ζ3
0.8319073727
See Also
integer
issqr
NumberTheory[Radical]
type
type/prime
Download Help Document