Post History
#3: Post edited
Determine whether an integer is square-free [FINALIZED]
An integer is called square-free if it is not a multiple of a perfect square other than 1. For example, 42 is square-free, but 44 is not because it is a multiple of the perfect square 4 = 2². Your task is to write a program or function that takes a positive integer, and returns a truthy value if the integer is square-free and a falsey value otherwise. This is code golf, the shortest code wins.
#2: Post edited
Determine whether an integer is square-free
- Determine whether an integer is square-free [FINALIZED]
#1: Initial revision
Determine whether an integer is square-free
An integer is called square-free if it is not a multiple of a perfect square other than 1. For example, 42 is square-free, but 44 is not because it is a multiple of the perfect square 4 = 2². Your task is to write a program or function that takes a positive integer, and returns a truthy value if the integer is square-free and a falsey value otherwise. This is code golf, the shortest code wins.