Here's a possible intended solution to show that 30031=2cdot3cdot5cdot7cdot11cdot13+1 is composite without factoring it. Recall the Fermat primality test: if an−1notequiv1bmodn, then n cannot be prime. It turns out that 230030equiv21335bmod30031, so 30031 must indeed be composite. There is a well-known algorithm called binary exponentiation that is reasonably fast to implement by hand and that could conceivably be done on an exam. (I am not totally convinced that this would be faster than trial division until p=59, though. And if you followed Leonid's suggestion in the comments your life would be even easier.)
Edit: Here is the solution by trial division. It suffices to check the primes from 17 up. Note that the fact that we know the prime factorization of 30030 helps a lot. All of the arithmetic necessary beyond what I wrote down was mental.
For 17 write 30031=30cdot77cdot13+1equiv−4cdot9cdot−4+1equiv−8bmod17.
For 19 write 30031equiv−8cdot1cdot−6+1equiv11bmod19.
For 23 write 30031equiv7cdot8cdot−10+1equiv−99bmod23.
For 29 write 30031equiv1cdot−10cdot13+1equiv−100bmod29.
For 31 write 30031equiv30000bmod31.
For 37 write 30031equiv−7cdot3cdot13+1equiv−13bmod37.
For 41 write 30031equiv−11cdot5cdot13+1equiv−14cdot13+1equiv−140bmod41.
For 43 write 30031equiv−13cdot−9cdot13+1equiv−26bmod43.
For 47 write 30031=210cdot143+1equiv25cdot2+1equiv4bmod47.
For 53 write 30031equiv−2cdot−16+1equiv33bmod53.
Finally, for 59 write 30031equiv33cdot25+1equiv11cdot16+1equiv0bmod59.
No comments:
Post a Comment