IsSquareFree
Tests if an integer isn’t divisible by a prime square.
Syntax

IsSquareFree(n)

n
is an integer

Description
If n
is an integer, then IsSquareFree(n)
returns true
iff n
is a squarefree integer. An integer is squarefree if it isn’t divisible by any square of a prime number. Equivalently, it is squarefree if it isn’t divisible by any perfect square other than 1
.
Hence, the prime factorisation of a positive squarefree integer contains only primes with multiplicity one, i.e. the integer is equal to its radical. Conversely, if a positive integer is equal to its radical, it is squarefree.
Examples
filter(SequenceVector(30), IsSquareFree)
(1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30)
count(SequenceVector(1000), IsSquareFree)
608