Dave Bayer, a professor of Mathematics at Barnard College, Columbia University, was consulted on the mathematical equations that appear in the film. For the scene where Nash has to teach a calculus class and gives them a complicated problem to keep them busy, Bayer chose a problem physically unrealistic but mathematically very rich, in keeping with Nash as "someone who really doesn't want to teach the mundane details, who will home in on what's really interesting". Bayer received a cameo role in the film as a professor who lays his pen down for Nash in the pen ceremony near the end of the film.