MathLabs

Problem 4

Find all positive integers nn such that {n,n+1,n+2,n+3,n+4,n+5}\{n,n+1,n+2,n+3,n+4,n+5\} can be partitioned into two disjoint sets whose products are equal.
Step 3 of 4: Apply Wilson’s theorem
In plain words

The product is fixed modulo 77, independent of nn.

∏j=05(n+j)equiv6!equiv−1pmod7\prod_{j=0}^{5}(n+j)\\equiv6!\\equiv-1\\pmod7
Detailed analysis

Wilson’s theorem gives 6!≡−1(mod7)6!\equiv-1\pmod7, so the product of the six numbers is congruent to −1-1 modulo 77.