Difficulty: ★ ★ ☆ ☆
I’d like to know when mathematicians arrive at their “a-hah!” moments. Do they just have an equation pop into their head and mutter, “Golly, I wonder what that means?” Or do they wake up screaming in the middle of the night? Personally, I can well connect with the latter.
Consider Figure 1, which illustrates a mathematical Series That Has No Name:

Figure 1. The frightening mathematical Series That Has No Name.
This series is described as the sum of a value cubed over the same value factorial. It converges on the value 5e, Euler’s number, which was the topic of this blog’s June Exercise in 2020.
Your challenge for this month’s exercise is not to understand the equation or why it’s meaningful. No, your challenge is to code the equation so that the result is Euler’s number, e. For example, here’s output from my solution:
2.718282
This number has relevant mathematical properties that get the propeller heads all excited. But it’s important enough that a constant exists in the math.h header file, M_E. It’s equal to:
2.71828182845904523536028747135266250
So my solution’s answer is pretty dern close.
To help you calculate the value, you can borrow from this Lesson that covers factorials.
Please try this exercise on your own before you peek at my solution, which I’ll post in a week.
I’m surprised it hasn’t got a name. Maybe there’s a mathematical lost property office and if nobody claims it within three months it becomes yours: Gookin’s Formula.
I suspect it was derived using calculus.
“Gookin’s Formula” involves alcohol. :-\