cubefree - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


type/squarefree

check for a square-free integer

type/cubefree

check for a cube-free integer

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type( expr, squarefree )

type( expr, cubefree )

Parameters

expr

-

any Maple expression

Description

• 

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.

Examples

> 

type⁡6,squarefree

true

(1)
> 

type⁡12,squarefree

false

(2)
> 

type⁡12,cubefree

true

(3)
> 

type⁡54,cubefree

false

(4)

The asymptotic natural density of square-free integers is equal to 6π2=1ζ⁡2.

> 

N≔100000:nops⁡select⁡type,seq⁡1..N,squarefreeN

3039750000

(5)
> 

evalf⁡%

lastexception

(6)
> 

evalf⁡6π2

0.6079271016

(7)

Similarly, the asymptotic natural density of the cube-free integers is 1ζ⁡3.

> 

N≔10000:nops⁡select⁡type,seq⁡1..N,cubefreeN

831910000

(8)
> 

evalf⁡%

lastexception

(9)
> 

evalf⁡1ζ⁡3

0.8319073727

(10)

See Also

integer

issqr

NumberTheory[Radical]

type

type/prime