Sunday, May 17, 2026

Living my prime years

Another year, another birthday! And what a year it's been. Last year around my birthday I was working with NEON on the slopes of Mauna Loa (about which I gave a talk this week at the Hilo photography club meeting). This year I've just wrapped up finals weeks at UH Hilo after my first semester teaching, and attended the graduation ceremony yesterday. Attending graduation as faculty was an interesting experience and I have some thoughts about it, but they're still crystallizing so they'll come in a future post.

For today, I was thinking earlier that I'm celebrating my 37th birthday, and how that's back to being a prime number after 36. And then I thought about phrases like “being in one's prime,” or “being in the prime of life,” and started wondering: just how many years have I spent at a prime age?

Now, what does that very hastily-conceived notion mean? It's essentially just how many of your preceding years of life corresponded to prime numbers. We have to a little careful about birthdays, though; in essence, birthdays count years of age since the day of your birth, so your first birthday comes at the end of your first year of life. You are then “1 year old” during your second year of life until your second birthday. If we count the years which correspond to a prime number as “prime years”, we can compute, at each birthday, how many of your preceding years were “prime years” and what fraction that makes with your total number of years lived, as in this formula:

\[\text{prime years fraction}_{\text{at age }n}=\left.\frac{\text{prime years}}{\text{total years}}\right]_{\text{at age }n}\]

Confused yet? Let's start from your first birthday, which celebrates your first year outside the womb. One is not a prime number, so your total number of prime years lived to this point (out of a total of one) is zero; your prime years fraction is thus \(0/1=0\). At your second birthday, you have lived a total of two years; the first one is not prime, but your second year corresponds to two, which is prime, so you have one prime year out of two, or \(1/2=0.5\). At your third birthday, you have lived one non-prime year and two prime years (since two and three are prime), for a fraction of \(2/3=0.66\dots\)

And it's not hard to see that this is as good as it gets – at your fourth birthday you'll have lived two prime and two non-prime years so the fraction returns to 0.5, and since prime numbers only ever get farther apart your fraction of prime years begins a slow slide downwards. One interrupted by upwards jumps at each prime birthday, to be sure, but the overall trend is obvious. I found this sufficiently interesting to write up a quick Python program and plot what it would look like for ages 1–100, and here it is:

You can see the trend I've described: it starts at zero at your first birthday, shoots upwards the next two years, then begins a jagged descent. Since 37 is prime I've just jumped up to a prime fraction of 0.324, or, another way of putting it, just under one-third of my lived years have been prime (numbers).

The plot kind of reminds me of the nuclear binding energy curve in atomic physics, but I was also intrigued with where it seemed to be going. I thought it might be converging towards 0.2, but running it to 1000 dispelled that notion:

At this point I suspected it was converging towards zero at infinity, but my naïve implementation of prime-checking in my code was starting to take noticeably longer to run at higher upper limits. For a limit of ten thousand it still took under two seconds to run, but at a hundred thousand it took over four minutes:

I'm sure I could implement a more sophisticated method of prime-checking and push it higher numbers, but ultimately, checking whether a number is prime or not is a difficult problem (and one on which much of modern computer security depends). The overall trend is clear, mathematically, so for an idle musing like this I'm satisfied with what I got.

Anyway, I hope you found that at least a little interesting. We'll see where life takes me this year. Currently my summer is wide open (I've got a lot of ideas for things to do) and I'm on the schedule to teach again in the fall, but who knows where things might end up going. A hui hou!

No comments:

Post a Comment

Think I said something interesting or insightful? Let me know what you thought! Or even just drop in and say "hi" once in a while - I always enjoy reading comments.