+ 1

Prime numbers

i come across this statement while working with prime numbers-"no number is divisible by more than its half" which i don't really agree. for example 100 divided by 51 is 1 point something. what do they meant by that statement.

18th Jun 2018, 2:40 AM
stephen haokip
stephen haokip - avatar
3 Respuestas
+ 5
divisible /dɪˈvɪzɪb(ə)l/ adjective 2. MATHEMATICS (of a number) containing another number a number of times without a remainder. "24 is divisible by 4" ^
18th Jun 2018, 2:53 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
I think what they're trying to refer to is that no number can be divided by a number greater than its half to equal a whole number. You can use this while trying to find prime numbers by setting a statement that only searches for any number less than or equal to half of the value of the number that it can be evenly divided into.
18th Jun 2018, 2:49 AM
Faisal
Faisal - avatar
0
I would do a loop that start from 2 to the square root of the number, instead of the half of the number.
18th Jun 2018, 1:51 PM
Budi Setiawan
Budi Setiawan - avatar