You are in your friend's home.You are asked by your friend, a mathematician to enter a totally dark room and to pick up a pair of socks from a certain drawer.You are told that there are some socks in that drawer, and that each can be either black or white. You are told as well that the probability of picking at random two black socks is 1/2.

What is the probability of taking out a pair of white socks from the drawer?

First, starting with the given (B/(B+W))*((B-1)/(B+W-1))=1/2, if you clear the fractions, multiply by 2, and add 1 you come up with (2B-1)^2 = (B+W)^2 + (B+W-1)^2, which is the familiar Pythagorean equation with the two legs differing by 1.

If you then use the parametric solutions p^2-q^2 and 2pq for the two legs, with p,q different parity, you get (p-q)^2 - 2q^2 = +-1, where the +- sign accounts for either leg being longer. That's Pell's equation. Second surprise.

I sympathize with Ady's comments in #4 about the size of the drawer. He should know he's following historical precedent. When the most famous Pell's equation I know was used to solve Archimedes' cattle problem, people worried that so many bulls and cows might not fit on Sicily, as required. "but the Sun god, to whom the cattle belonged, will have coped with it."