The walls of the cell where Christopher Havens was serving a 25-year murder sentence were covered in notebook paper.

The sheets filled with numeric and Greek scratchings had quickly overwhelmed his modest desk and were now forming a patchwork wallpaper that spread from that corner and began to wrap around the 8x12 room. The neatly nesting equations of the continued fractions guiding his chase could run on for 15 feet as he hunted for patterns that might offer a clue.

Some pages were complete nonsense, grasps into the unknown with whatever method appeared to him. Other pages made progress. They showed promise in his self-taught number theory education. Though Havens didn’t know this yet. He also didn’t know his problem didn’t have an answer. Guards and other inmates would do double-takes as they passed. He looked like a freak, but that didn’t matter anymore. He was getting somewhere. He was leaning into sticking out. Fitting in had gotten him into prison in the first place.

November 2012 was not the first time Christopher Havens was** **sure he’d hit rock-bottom. There were the years he spent on the run from the law, when his family assumed he was dead. There were nights spent shivering on the streets of San Francisco and losing custody of—and contact with—several of his children. Like most addicts, Havens had splatted onto what he swore would be the very last bottom he’d ever hit more than once.

But this had to be it.

Havens was in a solitary confinement cell at the Washington State Penitentiary in Walla Walla, Washington. When he’d arrived at the high-security facility to serve 25 years for murder, he’d felt fitting in was his best chance at not ending up a target. “During a phone call from prison, my father asked me if I was going to be a clown fish in a sea of sharks,” he says. Havens chose to be a shark. He began “probating” for a gang—like pledging a fraternity. One of his tasks was to fight another prisoner. Just two months after he’d walked through the prison doors, that choice had landed him here: a tiny, cold cell where the lights were on 24 hours a day and inmates around him released their anger and frustration by screaming, banging on the walls, and occasionally smearing feces on the air conditioning vents. He couldn’t sleep, so he sat, did sudoku puzzles, and thought about the decades he had left.

Havens could blame his fear or his dad’s words for sending him to the prison gangs. When he really was honest with himself, though, he realized joining was entirely predictable. Since he was a kid, he’d just wanted to belong. But wanting people to like him was how he got into drugs, which had led to prison. And his desire to be liked had stuck him in this cell, totally alone for months.

Every afternoon—although time of day was hard to know with the lights always on—Havens could hear a prison employee passing something to the other inmates. “He’d slip something in their cells and keep walking,” Havens says. The first few times “Mr. G.,” as the inmates called him, went by, Havens didn’t bother asking what he was giving out. He was content to wallow with his sudokus. As the days stretched on, he realized he needed more—he needed anything—to pass the time. He positioned himself by his door and asked Mr. G. what exactly the other inmates were getting. Mr. G. didn’t reply, but the next day, a packet of math worksheets slid through the slot of his cell door.

Havens had dropped out of high school as a sophomore. Even when he had attended, he had missed a lot of class, and he says big patches of his adolescent memories are fuzzy from drug use. If he sat with each problem on Mr. G.’s sheets for long enough, however, he could always wrestle out a solution. “It got to where it was all I was doing,” he says. “I was staying up all night.”

Every day, Mr. G. would hand him a packet of new and corrected worksheets. They were basic. Mostly algebra, says Havens, adding that he was soon asking Mr. G. about more advanced types of math and wondering if he had harder packets. Mr. G. didn’t. After a couple of months, Mr. G. passed him a kite—or a note—instead of his regular packet. It said: “Mr. Havens, you have surpassed my abilities. Good luck.”

For the first time in a long time—maybe since childhood—Havens realized he had a valuable talent. He’d been a decent petty thief and a great drug addict, but those years of only being good at bad things had hollowed him out. Now, each solved equation converted to fulfillment. He felt peace. He had direction. And he was in love, he says. He decided to dedicate his 25 years to preparing for a future in mathematics, with the idea that perhaps someday he could repay his debt to society as a mathematician. What he miscalculated, though, was how soon that future would arrive.

Havens is clear-eyed about what he did, even if the memories are murky. In 2010, he was living in Olympia, Washington, and after his meth habit lost him the graveyard shift cooking at Denny’s, he began to sell the drug. The man he killed was someone he sold with. Havens says he was afraid of the man he killed, and he and a third man decided to take him out first. In hindsight, Havens says he’s not sure what was happening and whether, through the fog of addiction and its ensuing paranoia, any of them were seeing reality for what it was. He wishes he could be there for his kids (he has five), and his mom. And would like to find some way to give back. If he actively made America less safe before, perhaps now he could use his talent for math to swing the pendulum back.

Having given up on school as an adolescent, it was easy for Havens to forget he’d always been good with numbers. In elementary school, Havens’s mom, Terry Forte, was shocked by how quickly her son seemed to pick things up, especially math. She was a nurse, and she’d done fine but not excelled in math classes. By fourth grade, however, her son was so far ahead that teachers often asked him to tutor other students. Forte says that her son loved stepping in to help others. Forte served in the Army, so they had moved every few years. Havens, who describes himself as “never popular and a little awkward,” would do just about anything to fit in after each move. That’s where the smart, kind kid started changing for the worse. In his teens, trying to fit in meant trying a little weed and some alcohol, then some mushrooms, then LSD, and then on to pain pills and meth—because that’s what the other teens were doing. But he wasn’t a bad kid, just a kid who was desperate to be liked, says Forte. “He’d give his shirt off his back for anybody, which is one reason it was so hard for me to believe what happened.”

In 2010, Forte noticed her son, now in his early 30s—who had been clean and then not clean and then clean again—slipping. Her barometer for Havens’s sobriety was how well he cared for his daughter, who he’d taken in after her mom had signed over custody to the state of California. Havens was a single dad, and recently his mind seemed everywhere but on parenting. Forte was worried.

The call from a cop one afternoon wasn’t that much of a surprise, but what he said was. “When the police first called and said he was in jail for murder, I told them, ‘No he’s not,’ and then I hung up on them,” Forte says. A beat later, she called back. Murder? It couldn’t be. Her son was so kind.

Christopher Havens began his first day at the Washington State Penitentiary learning prison terminology—phrases like “the hole”—and finding a crew of friends. He was repeating the same pattern that had gotten him into trouble so many times before.

What broke it was solitary. There was no one to fit in with but himself.

After Havens graduated from Mr. G.’s worksheets, he began teaching himself trigonometry, calculus, and then advanced concepts like hypergeometric summation. When he called his mother to ask for a trigonometry textbook, she was a little surprised. It wasn’t because he was a high school drop-out—she knew he was smart—but because he’d finally developed the desire to do something with his intellect. A few weeks later, when he asked for a book on calculus, she was not surprised. “One thing when he was younger was that if he set his mind to do something, he would do it,” says Forte. Anything he took on he would tackle and then drag well past the end zone. As a kid, that meant beating a video game at every level before moving on to a new one, and coming home from soccer games exhausted and covered in bruises.

Within a few months, Havens was requesting textbooks so obscure, like *Confluent Hypergeometric Functions*, that, Forte says, “I’d ask, can you spell that? Because I have no idea what you’re talking about.”

When Havens moved out of solitary and back into the general population, his friends noticed a change. “At that time, I was more concerned with my education than I was with prison culture. Eventually, one of the guys said, ‘You don’t belong with us.’ And I was like, you know what? You’re right,” says Havens.

### A Sample of Havens's Work on the *Research in Number Theory* Paper

Havens has limited computer access, so he does almost all of his work by hand. Theorems often stretch on for pages as he looks for patterns that could lead toward a solution. These pages are some of the many he sent to the University of Turin in Italy, showing his work solving a previously unsolved problem. In January 2020, his best work on the problem was published in the journal Research in Number Theory.

If these weren’t his people, perhaps he could find his crew among the professional mathematicians of the world. In January 2013, Havens wrote to the Mathematical Sciences Publishers, an organization that publishes several prestigious academic math journals. He explained that he was an inmate trying to learn advanced math. “I asked them for some of their journals, and also if they knew anyone to correspond with.” A few weeks later, he got a polite note that implied the journals might be over his head. And for a moment, Havens was once again all alone.

As a recovering addict, Havens knew this limbo well and recognized his own precariousness. “If you have someone in the middle of a transition and they’re trying to leave a lifestyle behind, and they don’t have any support, for a lot of people it drives them back to square one,” he says. Havens told himself he wasn’t going to backslide. Not this time.

Prison is a chaotic life. There are rules, of course, but they often feel arbitrary and capricious. Corrections officers can interrupt routines at any moment with a lockdown. And there’s an almost total lack of control. When you shower, eat, work, and sleep is all dictated by someone else. As tumultuous as prison is, it also somehow manages to be monotonous. Havens knew more or less how the next two and a half decades of his life were going to go.

But math helped Havens feel like he was in control. There are rules, but they’re logical and consistent across disciplines. And unlike prison, even when Havens understands the basic workings of a problem, the end result is often a surprise. Math, in many ways, is the perfect antidote to incarceration—and more incarcerated people than we realize are likely engaging in math-as-escapism, says Gary Gordon, Ph.D., a math professor at Lafayette College in Easton, Pennsylvania. He used to edit the “Problems” section of *Math Horizons*, an undergraduate-level journal for math enthusiasts. For each edition, he’d come up with a tricky but not totally unsolvable problem and readers would send him their solutions. It wasn’t uncommon for a few submissions to come from incarcerated folks. “They were always hand-written, so when they came in the mail they’d always stand out,” he says.

In 2015, Gordon got a solution from Havens. He was impressed by the ingenuity of how Havens got to the right answer. It was clear that he didn’t have a typical math background because he didn’t use the types of math Gordon expected to see in his route to the answer. Still, he got there. (Scroll to the bottom to try a *Math Horizons* problem written by Gordon. Click here to see a recently-published problem written by Havens)

But Havens wasn’t happy with solving what were essentially number riddles. He wanted to be a real mathematician—the kind who moves the discipline forward. In his appeal to Mathematical Sciences Publishers, Havens had noted his fascination with number theory, which is the study of integers. Number theory includes things like modular arithmetic, where repeating patterns of numbers help us understand things like the time in a 24-hour day on a 12-hour clock. It’s hugely useful in real-life applications—like for generating bar codes and performing encryption. While the editors at Mathematical Sciences Publishers may have underestimated Havens’s abilities, someone did pass on his request for a pen pal. One day a letter arrived from Turin, Italy.

### Modular Arithmetic 101

You already know modular math, thanks to how we read clocks. Modular arithmetic gets its name from the Latin word for "measure" and dictates how you’ll count through a series of numbers. On a clock, the modulus, or mod for short, is 12. We count up to 12 and then start over again. Which is why 3 p.m. is not 15 p.m., but 3 is congruent (essentially, equal) with 15 (mod 12). The modular operation is the act of taking the remainder when a number is divided by the modulus. So 3 and 15 are the same mod 12 because they both have a remainder of 3 when divided by 12. The modulus can be any positive number. For example, in mod 2, the numbers 3 and 5 are the same because they have a remainder of 1 when divided by 2. Unlike the numbers on a clock, in modular arithmetic, we generally start counting at 0. So the numbers used for arithmetic mod 12 are usually 0 through 11. Arithmetic mod 2 usually uses just the digits 0 and 1. All even numbers are equivalent to 0 mod 2, and all odd numbers are equivalent to 1.

A group of researchers working on number theory—specifically continued fractions (see Continued Fractions 101, below)—were behind the letter. The researchers declined to be interviewed for this story, but the daughter of one of them, Marta Cerruti, Ph.D., a professor at McGill University in Montreal, wrote about the connection for *The Conversation*, an editorial journal that publishes (mainly) the work of academics. Cerruti said she urged her father, Umberto Cerruti, Ph.D., a professor at the University of Turin, to send Havens a problem. What Havens sent back was a long, complicated, hand-written formula. “My father entered the formula into his computer and to his surprise, the results were correct!” she wrote. Umberto Cerruti then sent Havens another problem—this one without a solution.

Havens didn’t know that. Most people might have gotten Cerruti’s second missive and given up when they saw there was not yet a solution. But Havens couldn’t Google it and he assumed it had been solved. So he got to work.

To study number theory and, specifically, continued fractions, requires being willing to embrace the infinite, says Havens. Take, for example, Pi, which is an irrational number. The numbers after the decimal point go on forever. At first glance, they appear as a jumble. That isn’t actually the case, though. You can write an irrational number in another way—as a continued fraction. When you do, Pi changes from a mishmash of numbers after a decimal point to a series of orderly and nested layers—fractions within fractions—that predicate all the decimals of Pi ad infinitum. With an irrational number, those nested layers will go on forever. With a rational number—one with an end—the layers of fractions will terminate, or run out, eventually.

“To me, a continued fraction really is the heart of an irrational number,” Havens says. “They’re beautiful and pure, and they even have a pulse in the sense that their sets of convergents beat to the rhythm of a leaping arithmetic pattern.”

Convergents are rational numbers that can be used as approximations when writing continued fractions for irrational numbers. Their beauty comes in part from offering the best approximation of an irrational number, which, when written as a decimal, would run on for infinity. When working through a continued fraction, the more layers you compute, the closer your convergents become in approximating the irrational number, but you won’t ever get to the true, final number in finite time. Solving a continued fraction means finding all convergents for that fraction, Havens says.

These fractions within fractions let mathematicians study irrational numbers, like Pi and , and find patterns in their infinite decimals. Finding patterns in complex, irrational numbers is crucial to fields like cryptography and encryption.

The easiest way to jump into a continued fraction is to start with a “simple and finite” continued fraction, where you’ll have nothing but 1s in the numerator position of the continued fractions, and it will resolve in just a few steps. Continued fractions for an irrational number, like Pi, go on ad infinitum. Take 37/13. That’s one of those awkward improper fractions. You can also write 37/13 as 2 plus 11/13. That’s step one in converting to a continued fraction.

To get to the next nested layer, you again need an improper fraction to divide. So, change your 2 plus 11/13 to 2 plus 1 over 13/11. Now divide 13 by 11, which, of course, gives you 1 plus 2/11. That’s your next layer. This process goes on until the number you’d be dividing by is 1. That’s the end of a finite, rational continued fraction, since any number divided by 1 is equal to itself.

The problem Havens received from Turin involved studying what happens to a special type of continued fraction after it gets changed by something called a linear fractional transformation. Such a transformation is described by four numbers (*a,b,c,d*), and it maps a fraction *f* to the fraction (*af* + *b*)/(*cf* + *d*). What Havens and his colleagues discovered was that upon applying the transformation to the continued fraction, new families of continued fractions are born. Another surprising result was that the leaping patterns in the convergents were not always linear. “This result can open new fields of research in number theory,” wrote Cerruti in her piece on Havens’s work.

Publishing in an academic journal was Havens’s goal, but what happened next was not. When word got out that an incarcerated man had solved a “previously unsolvable” problem, the media went wild. The growth of the hyperbole was exponential. In early August, when I got Havens on the phone, he had one condition: That I not to compare him to Euclid, the Greek mathematician and father of number theory. That had recently happened in another article, and Havens was deeply, deeply uncomfortable with the comparison. So was the team in Italy. (Havens asked me not to reach out to Umberto Cerruti, and was not surprised when the other members of the Turin team didn’t respond to my interview requests.) Academics work in teams and build on the work of many thinkers before them. Havens didn’t do his work alone, and he certainly didn’t come up with a whole new branch of mathematics.

Havens has 14 years left in his sentence—12 if his good behavior holds. Another decade and change of missing his children’s milestones. And they may well be parents themselves by the time he reenters society. But Havens views his sentence as an opportunity to learn and launch a career. (He also points out he’s a better father now.) Because Havens is self-taught, there are big gaps in his mathematical knowledge. Most students follow a practical line of study, with each new subject building on the last. Havens had to guess. He’s still corresponding with the team in Italy, plus a mathematics professor at Harvard in an attempt to fill those holes. And he plans to begin a formal education upon his release. Havens is well aware that many felons only find menial jobs after serving their time, but he refuses to accept that future. “Most inmates wait until release to start their career,” he says. “Not me. I am going to redefine what productivity looks like in prison.”

To that end, Havens launched the Prison Math Project in 2016, which he’s now taking national. “My mission is to change lives through reversing recidivism using math,” he says.

The program is based on the system Mr. G. used, starting with sending worksheets to prisoners. Then he pairs inmates with academic mentors to help guide their studies.

Between filling the gaps in his own education and building a program for other incarcerated math lovers, Havens is spending the rest of his sentence focused on his bigger mathematics goal: learning cryptography. Cryptography is the preservation of information via math and numbers, and an extension of number theory. In fact, cryptography is the reason Havens first became interested in number theory—he knew he’d need to learn it first to have any chance of understanding cryptography’s basics. In Marta Cerruti’s article, she mentioned that Havens was looking for a mentor and it caught the attention of Amit Sahai, Ph.D., a cryptographer at UCLA. Havens and Sahai now correspond regularly. Sahai says that Havens is “easily among the most diligent students I have ever had the pleasure of working with throughout my entire academic career.”

He’s not just diligent, he’s also incredibly clever—and determined. “Over the past few weeks, he has solved a couple of advanced problems that few of my UCLA undergraduates are able to solve while in teams, even though Christopher is working by himself, in what we can euphemistically call an ‘adverse environment,’” Sahai says.

Havens can spend entire days working on the problems Sahai sends. Part of his new obsession stems from the fact that cryptography is equal parts logic and mathematics. But the other reason is that so far, he feels like the culture of cryptography is welcoming to someone like him—exactly as he is.

What Sahai loves about cryptography, however, is that, “in cryptography, we try to achieve impossible goals. In a lot of fascinating cases, some goal may appear intuitively impossible, but turns out to be possible.” Sahai might as well be describing Havens.

### Can You Solve This *Math Horizons* Sample Problem?

A dial (as in figure 1) can point to any whole number from 1 to n in order counterclockwise. It starts on 1, and then is turned in succession (always counterclockwise) one position, then two positions, then three positions, and so on, until a final turn by n-1 positions. For example, the first five positions for n=12 would be 1, 2, 4, 7, 11, and 4. For what n will the dial point to a different position at every stage of this process?The best way to get a handle on this problem is to start small. A one-point dial would not work, but we could try a two-point dial. In that case, we would start at 1 and perform the turn once by one to get 2, so the sequence of numbers the dial would point to would be 1-2. This meets the problem's criteria of pointing to a different position in every stage, but it's not the answer Gordon and Ozbay are looking for. Rather, n is a type of number with infinite integers that fit the problem's requirements.

Submitted by Gary Gordon and Deniz Ozbay, November 2020 issue of Math Horizons

To avoid drawing a dial for every n, we can translate the problem into modular arithmetic. For any n, recording the sequence of dial positions in the question is the same as starting with 1 and adding first 1, then 2, then 3, all the way to n−1, all mod n. Experiment with a few of these yourself to get a feel for the question. If you do, you’ll find that for n=3, you get the sequence 1-2-1; for n=4, you get the sequence 1-2-4-3 (another that fits the criteria); and for n=5, you get the sequence 1-2-4-2-1.

The case where n=6 is especially instructive. We start with the number 1, then add 1 to get 2. To that, we add 2 to get 4, then we add 3 to get 7 (which is 1 mod 6), 4 to get 5, and 5 to get 10,(which is 4 mod 6).

Hence, the sequence is 1-2-4-1-5-4, and we have repeated not one but two numbers. Between the first and second 1, we added 1+2+3, or 6, which is the same as n. Between the first and second 4 in our sequence, we added 3+4+5, or 12. In both cases, there was a sequence of con-secutive numbers that added up to a multiple of 6.

Keep trying for yourself and see if you can make a guess about what numbers do or do not yield repeated terms in your sequence. When you have a guess, you might want to look up polite numbers and see if you can figure out what they have to do with this question.