Monday, November 14, 2022

Timewasting

I didn't start a quest to find the most useless functions possible, just got to noodling starting with the prime question a bit earlier. Probably everybody knows the old faithful Taylor series for $e^x$: $\sum_{n=1}^\infty x^n/n!$. That's for all non-negative integers $n$. You know what $e^x$ looks like.

What do we wind up with if we try something similar but with the primes instead? Naturally there are plenty of possibilities. In what follows let $p_i$ be the i'th prime number.

How about just having products of primes in the denominator? $$\sum_i { {x^i} \over {\prod_{n=1}^i p_n}}$$

It falls to a minimum and then starts to rise again as you go negative. It doesn't rise as fast as $e^x$ for increasing $x$, unsuprisingly.


OK, suppose we use factorials instead of just the products of primes. $$\sum_i {{x^i} \over {p_i !}}$$

For $x$ increasing it also doesn't rise as fast as $e^x$, but for negative $x$ it climbs faster than before. Both this and the previous have a minimum: the one about about -2.7 and the previous at about -3.27.


One more, just for laughs. Pick out just the $e^x$ Taylor series expansion terms with prime powers of x.

$$ \sum_i {{x^{p_i} \over { {p_i} !}} $$

It has 2 inflection points, and rises with $x$ increasing and falls with $x$ decreasing--sort of like a cubic would. Curious.(*)

And not obviously useful.


To wrap up, what started the exercise for me was, for $x \in [-1,1)$, $$ \sum_i { {x^i} \over {p_i} } $$.

Naturally this diverges almost everywhere, but it's cute.

If you've wondered why high school graphing calculators haven't changed in 20 years, this is why: it would do most of your algebra homework for you.


(*) It looks like Mathjax fails with this command--it boxed the raw LaTeX instead of processing it. I wonder why. And to make the text fall below the images, I had to add "style=clear:both;" inside the paragraph command.

No comments: