type/squarefree - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Numbers : Type Checking : type/squarefree

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

type6,'squarefree'

true

(1)

type12,'squarefree'

false

(2)

type12,'cubefree'

true

(3)

type54,'cubefree'

false

(4)

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

N100000:nopsselecttype,seq1..N,'squarefree'N

3039750000

(5)

evalf%

lastexception

(6)

evalf6Pi2

0.6079271016

(7)

Similarly, the asymptotic natural density of the cube-free integers is 1zeta3.

N10000:nopsselecttype,seq1..N,'cubefree'N

831910000

(8)

evalf%

lastexception

(9)

evalf1Zeta3

0.8319073727

(10)

See Also

integer

issqr

NumberTheory[Radical]

type

type/prime