Math is cool. When you think about it, arithmetic is really just the language through which reality happens. Knowing everything that is, was, and ever could be is explained mathematically, one begins to notice a few interesting patterns. Seemingly massive, complex, unrelated concepts are governed by the same simple arithmetic principles. One of these concepts is recursion.

Recursion is really neat, because it’s an easy way to rationalize the notion of infinity. Put simply, a recursive function is one that continues indefinitely, because the function is partially defined by itself. For example, picture in front of you a set of Russian nesting dolls. You break one open and reach for the next one inside. Question: What is the smallest nesting doll you could find? The answer is that there is no minimum; it’s a mathematical function that goes on forever. The same is true for the opposite direction– there is no maximum doll size, either. The important thing about recursion is that it often avoids creating paradoxes by propagating itself in more than one direction.

Nesting dolls are a good place to start, but as we stated above, seemingly unrelated concepts are often related by the same ideas. In fact, the whole idea of a natural number defined recursively as the intersection of all sets fulfilling the properties 1) Zero is a natural number and 2) Every natural number is succeeded by another natural number. “But wait,” you might ask, “how can zero be a natural number if no natural number comes before it? Does it not then only satisfy one of the premises?” The resolution is simple once you remember that negative numbers exist. Although most mathematicians don’t consider negative numbers to be natural numbers, it is very important that the guiding principle behind the terminology works in both directions, with zero as the logical midpoint. Recursion saves us once more!

Alright, let’s go all in for one more crazy-ass, purely theoretical example. Your brain makes a natural hallucinogenic drug called N,N-Dimethyltryptamine, or DMT. The pineal gland releases a small amount of the drug during the R.E.M. sleep phase, which most psychologists believe is responsible for the act of dreaming. Perhaps you’ve noticed that dreams can have weird time dilation effects; that is, dreams that appear to last weeks or even months might actually last only a few hours. Well, as it turns out, an absurd amount of DMT is released from the pineal gland right as the brain senses that it’s about to die. It is not unreasonable to postulate that people who claim to have had near-death experiences were actually just under a heavy amount of DMT. So what does this have to do with recursion? Imagine if the DMT released into your brain just before death is sort of like a “last dream”. With such a high amount of DMT being released, it’s likely that the time dilation in this dream would be exponential– this dream could appear to last many, many years. So what if the final dream you fall into is an entirely new existence– an eighty-year dream that encompasses birth, life, and death. What’s more is that, at the end of this “second” life, more DMT would likely be released into your “second” brain, which would send that brain into an eighty-year dream, and the cycle repeats again. Therefore, recursion can be used to explain how it may be mathematically permissible for your consciousness to essentially live forever in an endless loop of birth, life and death.

Math is pretty neat.