Though I have loved math since childhood, I am not a mathematician. But I love studying math. And sometimes I find myself exploring numbers just for the fun of it, especially when I’ve been using RStudio or Octave for a project.
Finding Euler’s number is not improbable nor terribly difficult. The number is everywhere. There is more than one youtube video demonstrating the emergence of using various techniques. Euler’s number is one of those really beautifully transcendent properties of mathematics that puzzles and mystifies. And I know of nothing closer to inherent truth in this world than the beauty of mathematics.
But I wasn’t thinking about when I found it where I did. I was thinking about something else. I was pondering the relationship between an infinite series of integers and how they might relate to rational numbers. The question that occurred to me was simple — is there is limit to the following:
Note that I wasn’t considering because dividing by zero is not a good idea. And since I’m not using the values from the infinite series as an exponent, zero becomes problematic. So for the sake of cleanliness I stated the problem as listed above and wondered if a limit would emerge.
As a software developer, my approach to exploring the problem was naturally to write some code. The R code for this little project can be downloaded from github if you’re interested. As gets larger, the fraction gets smaller. Clearly the higher the value we assign to the return value will become increasingly smaller when compared to earlier iterations. But is there a limit?
As I played with the code, I realized that even though the function would always return increasingly smaller values as grew larger, it would nevertheless continue to grow and grow, even as approached infinity and approached zero.
But then my thoughts turned to the ever increasing number of fractions needed to get to the next highest integer value. For example, when , the value returned from the function is 1. So to get the return value to the next highest full integer value, in this case 2, the function must add:
Which returns the value 2.08333. For the next highest value, the function must add:
Which yields 3.019877. And so on. The number of fractions required to get to the next highest whole integer value increases.
Okay. Then it dawned on me that there might be a pattern to the increase in the number of fractions. So I tried a few experiments. What I discovered is emerges from a simple ratio created by the number of fractions required to attain the next highest integer value in the series.
So, for example, the total number of iterations required to attain 2.xxx is 4. The total number of iterations to attain 3.xxx is 11. Divide 11 by 4 and the result is 2.75. To attain the next highest integer part, 4.xxx, requires 31 iterations of the function. Take the current value for iterations and divide by the previous value, and the result is 2.818182. Continuing, to attain the next highest integer part, 5.xxx, requires 83 iterations of the function. Take the current value for iterations and divide by the previous value, and the result is 2.6774194.
If we continue, eventually the number of iterations of the functions at the current integer value divided by the number of iterations from the previous integer point appears to hover around plus or minus a very very small fraction.
|integer portion||value of j||prev j||j / prevj||value of i||prev i||i / previ||i / j|
One common method to derive is:
But with the methodology I discovered using RStudio, no exponential function is required. It is a simple ratio. Using the initial approach I used while experimenting:
And count the number of iterations of the function as the value of increases. Round of the fractional part of the returned value, leaving only the whole integer part. When the integer part exceeds the previous integer part, divide the current count by the previous count and the result appears to get increasingly close to .
The current iteration count (i) divided by the previous iteration count (previ) also holds true for the difference between i and previ as well. When the function tracks a difference value, j, which results from i – previ, and prevj = j – prevj, then that difference between iterations (j / prevj) also appears to hover around after a number of iterations.
I created a github repo for the code here.
Another interesting thing which emerged is the consistent and somewhat puzzling number that emerges when we divide i by j or previ by prevj. The number that emerges appears to be close to 1.581977. I can’t find that number in any math literature, but it does appear to be interesting. If we use as the hypotenuse of a right triangle and as one of the sides, the missing side would be 1.574976…which is close but not that close. I was hoping a simple relationship like that might emerge. But I don’t think it’s that simple.
The emergence of from a simple ratio of iterations over a simple sequence of 1 divided by consecutive integers, however, does appear to be an actual phenomenon. While it is likely others have found this magic before me, I have not found the work. Then again, as I stated at the outset, I am not a mathematician. I just like math.