My first thought was to use Wilson's theorem to get rid of the numerator: $$ \dfrac{255!}{128!\cdot 127!} \equiv \dfrac{1}{128!\cdot 127!} \mod 257 $$ But I'm stuck on how to find the inverses of the denominator. If $257$ wasn't prime I could try factoring it and solving a system of congruence. I also don't see a nice way to group the factorials by inverses.
Asked
Active
Viewed 127 times
2
-
1Try finding the last three digits of the expression or $\pmod{}$ ${1000}$ – MathStackexchangeIsNotSoBad Jun 14 '23 at 19:18
-
3https://en.wikipedia.org/wiki/Lucas%27s_theorem – JMoravitz Jun 14 '23 at 19:20
-
Follows easily using $,128^2\equiv 1,,$ by Wilson reflection in the linked dupe. – Bill Dubuque Jun 15 '23 at 18:44
1 Answers
10
Modulo $257,$ $$128!\equiv\prod_{k=1}^{128}(257-k)=\frac{256!}{128!}$$ hence $$\frac{255!}{128!127!}\equiv \frac{255!128!}{256!127!}=\frac{128}{256}=\frac12\equiv129.$$

Anne Bauval
- 34,650
-
5
-
2Very elegant, I think this was the intended solution (it's from an old exam in a course where Lucas's theorem isn't introduced) – Materia Gravis Jun 14 '23 at 19:51
-
2After that, using Appoach$0$, I just found some more or less duplicate. – Anne Bauval Jun 14 '23 at 19:53
-
Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Jun 15 '23 at 18:45
-
As you can see, I did look for dupes and there are none: only posts which, though related, are considered as such only by yourself. – Anne Bauval Jun 15 '23 at 20:41