Exercise 1143Number theory › PrimesHigh schoolAdded 3 Nov 2026
Primality test up to $\sqrt n$
#primality test#sqrt#trial division
Statement
Test whether is prime.
Hint
Test divisibility by primes up to .
Show solutionHide solution
Solution
Primes to test. .
Divisibility.
- : odd.
- : digit sum , not divisible by .
- : ends in .
- : , remainder .
Conclusion. is prime.