Unemployed
number theorist Max Cohen, who lives in a drab apartment in
Chinatown, Manhattan, believes everything in nature can be understood through numbers. He suffers from
cluster headaches, extreme
paranoia,
hallucinations, and
schizoid personality disorder. His only social interactions are with his mathematics mentor, Sol Robeson (now disabled from a stroke), and those who live in his building: Jenna, a little girl fascinated by his ability to perform complex calculations, and Devi, a young woman living next door who sometimes speaks with him. Max tries to program his computer, named
Euclid, to make
stock predictions. Euclid malfunctions, printing out a seemingly random 216-digit number, as well as a single stock pick at one-tenth its current value, then crashes. Disgusted, Max throws away the
printout. The next morning, he learns that Euclid's pick was accurate but cannot find the printout. When Max mentions the number, Sol becomes unnerved and asks if it contained 216 digits. He reveals that he came across the same number years ago and urges Max to take a break from his work. Max meets Lenny Meyer, a
Hasidic Jew who does mathematical research on the
Torah. Lenny demonstrates some simple
Gematria, the correspondence of the
Hebrew alphabet to numbers, and explains that some people believe the Torah is a string of numbers forming a code sent by God. Intrigued, Max notes that some of the concepts parallel other mathematical concepts, such as the
Fibonacci sequence. Agents of a
Wall Street firm approach Max. One of them, Marcy Dawson, offers him a classified
computer chip called "Ming Mecca" in exchange for the results of his work. Using the chip, Max has Euclid analyze mathematical patterns in the Torah. Once again, Euclid displays the 216-digit number before crashing. As Max writes down the number, he realizes that he knows the pattern, undergoes an
epiphany, and loses consciousness. After waking up, Max appears to become
clairvoyant and visualizes the stock market patterns he sought. His headaches intensify, and he discovers a vein-like bulge protruding from his right temple. Max has a falling-out with Sol after Sol urges him to quit his work. Dawson and her agents grab Max on the street and try to force him to explain the number, having found the printout Max threw away. Attempting to use the number to manipulate the
stock market, the firm instead caused the market to
crash. Driving by, Lenny rescues Max, but takes him to his companions at a nearby
synagogue. They ask Max to give them the 216-digit number, believing it was meant for them to bring about the
Messianic Age, as the number represents the
unspeakable name of God. Max refuses, insisting the number has been revealed to him alone. Max flees and visits Sol, only to learn from his daughter, Jenny, that he died from another stroke. He finds a piece of paper with the number in his study. At his own apartment, Max experiences another headache but does not take his painkillers. Believing the number and the headaches are linked, Max tries to concentrate on the number through his pain. After passing out, Max goes to the bathroom where he stares at himself in the mirror before lighting a match and burning the piece of paper with the number. Max then takes a power drill to his own head,
trepanning himself in an effort to find relief. Sometime later, Jenna approaches Max in a park and asks him to do several calculations, including 748 ÷ 238 (an approximation for
pi). Max smiles and says that he does not know the answer, seemingly at peace. ==Cast==