The Brain Theorem
In a season six episode, the characters (with help from the Harlem Globetrotters) have to solve a mathematic theorem that would get everyone their own brain back after an experiment gone wrong. The theorem is mathematically sound and can be proven.