Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Consider Q to be the product (p-1)!. Then consider the product a.2a.3a.4a...(p-1)a. These are the same items rearranged, because a has an inverse.

But the product is also a^(p-1).(p-1)! by commutativity. So a^(p-1)=1 (mod p).

There's a clever idea in there, to consider prod(ka) for fixed a and k=1..(p-1). Not finding the clever idea means you won't prove it. Finding the clever idea is tricky. Once you know the clever idea the proof is trivial.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: