Hello,
I was wandering if someone could explain the answer to this flashcard. It states that we test every number up to radial n. I’m not sure what it means by this and how will this tell us if it’s a prime or not? Would love any feedback you all have thank you!
There’s a pretty interesting property that we can observe to come up with the reason why we do this.
Let’s think about 24. We can use the “Nifty Factor Finding System” to list out the factor pairs of 24:
Factor 1 | Factor 2 |
---|---|
1 | 24 |
2 | 12 |
3 | 8 |
4 | 6 |
Now, the square root of 24 is around 4.9
For each pair of factors, we can notice that “Factor 1” is below 4.9, but “Factor 2” is above 4.9.
So, for any factor pair of an integer n, one is below the square root, and one is above the square root. Of course the exception is square numbers where there is a factor exactly at the square root.
So, we only need to look for factors below and up to the square root. If there was a factor above the square root, we would have already found its “partner” below the square root.
Thank you!