I'm sure I'm not the only one who has bought a solution before (or even gotten a question right and went to the solution page to see how other people did it) and was amazed by the supposedly obscure theorems that people cite for their answers (most recently, this happened with Lucas' theorem).
So I ask, what are some more obscure theorems and such that come in use? What kinds of problems would they be applied to? (try to stay away from mentioning theorems that most people already know, e.g. stars and bars, vieta's formulas, or what have you)
One theorem I've found personally that comes in handy is the Sophie-Germain identity. It's not too obscure, but at the same time, not that many people know it. The identity is:
And it can be applied to problems such as these (credit: AOPS)
For what integer values of is composite?
Find the largest prime divisor of .
And there was a problem from and a similar one was featured on brilliant on the past. The problem was to compute