How old is the square root test for primes

112 Views Asked by At

It is well known that :

if $n$ is an integer, $n\ge2$, having no divisor $d$ such that $1<d\le\sqrt n$, then $n$ must be prime.

My Questions :

Since when do we know this result ?

To whom should we attribute it ?

Any precise references would be appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

A Brief History of Factoring and Primality Testing B. C. (Before Computers) by Richard Mollin (PDF link) makes two attributions.

To Ibn al-Banna, in application to the sieve of Eratosthenes:

Ibn al-Banna (ca. 1258-1339) appears to have been the first to observe that, in order to find the primes less than $n$ using the sieve of Eratosthenes, one can restrict attention to prime divisors less than $\sqrt n$.

To Fibonacci (in his Liber Abaci, first published in 1202), in application to primality testing:

In this work, Fibonacci gave an algorithm to determine if $n$ is prime by dividing $n$ by natural numbers up to $\sqrt n$. This represents the first recorded instance of a deterministic algorithm for primality testing.