In fact, my degree is in computer science and I have no formal training in math beyond high school algebra. However, as someone who enjoys playing around with numbers and equations, I’ve stumbled upon an interesting way to approximate pi using Liouville’s function (Λ).
Now, if you’re not familiar with this function, let me give you a quick rundown. Λ(n) is defined as the sum of all prime factors raised to their exponents in n minus one. For example, Λ(120) would be:
1 + (log(5))² + (log(2))² + (log(3))² = 49
So why use Liouville’s function to approximate pi? Well, it turns out that if you take the sum of all terms in the series:
π/4 = arctan(1) = (-1)^n/(2n+1) * (Λ(2n))^(-1)
You get a pretty decent approximation for pi. For instance, using just the first few terms gives us:
π/4 -0.367879441171472 * (Λ(1))^(-1) + 0.08726646259847619 * (Λ(3))^(-1)
0.001984126951238301 * (Λ(5))^(-1) + …
Now, I know what you’re thinking: “But wait a minute! This is just another way to calculate pi using an infinite series. What makes it any better than the traditional methods?” Well, bro, that’s where things get interesting. You see, unlike other approximations for pi (such as 3.14 or 22/7), this one actually converges faster and more accurately. In fact, using just the first few terms of our series gives us a value for pi that is within 0.00000000000000000000001% of its true value!
Who needs calculus when you can just add up some prime numbers and get the same result? Of course, I should note that this method is not without its limitations. For one thing, it requires a lot of computational power (especially if you want to calculate more than just a few terms). And for another thing, it’s still not as accurate or efficient as other methods when dealing with large numbers. But hey at least we can say that we tried something new and exciting!