# Surprisingly long closed form for simple series

For natural $$A$$ define $$f(A)=\sum_{n=1}^\infty \frac{1}{A^n}\left(\frac{1}{An+1}- \frac{1}{An+A-1}\right)$$

$$f(A)$$ is BBP (Bailey-Borwein-Plouffe) formula and allows digit extraction in base $$A$$.

For small values of $$A$$, Wolfram Alpha finds closed form in simple terms of 2F1 and also very long closed form in terms of algebraic numbers and logarithms.

The elementary closed for for $$f(5)$$ is about one screen long, here it is in plaintext:

-3/4 - log(1 - 1/5^(1/5))/5^(4/5) - ((-1)^(2/5) log(1 - e^(-(2 i π)/5)/5^(1/5)))/5^(4/5) + ((-1)^(3/5) (log(-1 + e^((2 i π)/5)/5^(1/5)) - i π))/5^(4/5) - (-1/5)^(4/5) log(1 - e^(-(4 i π)/5)/5^(1/5)) +
((-1)^(1/5) (log(-1 + e^((4 i π)/5)/5^(1/5)) - i π))/5^(4/5) + 1/4 ((4 log(1 - 1/5^(1/5)))/5^(1/5) - (4 (-1)^(3/5) log(1 - e^(-(2 i π)/5)/5^(1/5)))/5^(1/5) + (4 (-1)^(2/5) (log(-1 + e^((2 i π)/5)/5^(1/5)) - i π))/5^(1/5)
- 4 (-1/5)^(1/5) log(1 - e^(-(4 i π)/5)/5^(1/5)) + (4 (-1)^(4/5) (log(-1 + e^((4 i π)/5)/5^(1/5)) - i π))/5^(1/5))


The elementary closed form for $$f(7)$$ is several screens long.

Q1 What is the intuition for so long elementary closed form?

Q2 Is there simpler elementary closed form for $$f(A)$$ in terms of $$A$$?

• @ClaudeLeibovici, your link got mangled by the Markdown parser. I think [link text](problematic URL) will let it survive parsing (at least if you percent-escape any ) in the problematic URL. May 15 at 15:33
• wolframalpha.com/input?i=Sum%5B%28%281+%2B+An%29%5E%28-1%29+-+%28-1+%2B+A+%2B+An%29%5E%28-1%29%29%2FA%5En%2C%7Bn%2C1%2CInfinity%7D%5D May 16 at 2:35
• Do you have a response to my answer below? May 19 at 18:07

Let $$a:=A$$. For $$a\ge2$$ and $$r\in\{0,\dots,a-1\}$$, we have $$s(r):=\sum_{n=1}^\infty\frac1{a^n}\frac1{an+r} =\sum_{n=1}^\infty\frac1{a^n}\int_0^1 dx\, x^{an+r-1} \\ =\int_0^1 dx\, \sum_{n=1}^\infty\frac1{a^n}x^{an+r-1} =\int_0^1 dx\, R(x),$$ where $$R(x):=\frac{x^{a+r-1}/a}{1-x^a/a}.$$

Using the partial fraction decomposition of the rational function $$R$$, we get an elementary expression (of length $$\asymp a$$) of the sum $$s(r)$$.

The sum in question is then $$s(1)-s(a-1)$$, for $$a\ge2$$. The case $$a=1$$ is easier.

• I like your answer, but why renaming $A$ to $a$? I think $A$ is simpler for the OP and everybody else, since $A$ is in the original question. May 15 at 15:53
• @GHfromMO : This is a fair point. However, in my answers, I have been (somewhat implicitly) trying to convince posters to use simpler notations, instead of more complicated ones, e.g., $a$ instead of $A$ or $\alpha$. In this case, I think the OP should have sacrificed the OP's possible personal convenience for the convenience of the audience. May 15 at 17:39
• Personally, I don't see how $A$ is a more complicated notation than $a$. May 15 at 19:44
• @GHfromMO : Typing $A$ requires pressing two keys (Shift+A), with only one key pressing needed for $a$. Also, capital letters are oftentimes, if not usually, reserved for sets (say of numbers) rather then for numbers. In this case, I cannot imagine any need to use $A$ rather than $a$, except for possible personal convenience for the OP. May 15 at 20:29
• @IosifPinelis, the frequent renaming of variables in your answers often makes them difficult for me to read. When you think that some OP has chosen variable names poorly (and when there are no comments or answers relying on the poor notation), I’d prefer that you edit the post to use the naming convention that you like, with a comment on why you think that convention is good here (eg “avoided capital letter which suggests a set of numbers”). Then when you answer you can do so in the notation that is both in the post and natural to you. May 16 at 1:29

The intuition becomes clear when we evaluate the series by bare hands.

For $$r\in\{1,\dotsc,A\}$$ we have \begin{align*}\sum_{n=0}^\infty \frac{1}{A^n(An+r)}&= \sum_{\substack{m\geq 1\\m\equiv r\pmod{A}}}\frac{1}{A^{(m-r)/A}m}\\ &=\sum_{m=1}^\infty\frac{1}{A^{(m-r)/A}m}\left(\frac{1}{A}\sum_{k=1}^A e^{2\pi i (m-r)k/A}\right)\\ &=\frac{1}{A^{1-r/A}}\sum_{k=1}^Ae^{-2\pi i kr/A}\sum_{m=1}^\infty\frac{e^{2\pi ikm/A}}{A^{m/A}m}.\end{align*} The inner sum on the right-hand side equals $$-\log(1-e^{2\pi ik/A} A^{-1/A})$$, and dropping the $$n=0$$ term is easy.

• Thanks. What is closed form for the infinite sum? Can you compute by hands f(11)?
– joro
May 15 at 10:01
• I added one more line in the middle while changing a few $\exp^{ix}$ to $\mathrm{e}^{ix}$. May 15 at 10:10
• @joro I thought it was clear what I wrote. The $m$-sum is a logarithm, hence the right-hand side is a sum of $A$ logarithms. For your sum you will need the left-hand side for $r=1$ and $r=A-1$, and get rid of the $n=0$ term. Hence $2A$ logarithms (and 2 fractions) will do. This works for every positive integer $A$, not just $A=11$. May 15 at 13:47
• @MarkWildon Thanks. Your extra line was missing the summation over $m$, which I added now. I also changed $\mathrm{e}^t$ to $e^t$ as it is more customary that way (see e.g. en.wikipedia.org/wiki/Exponential_function). May 15 at 13:52
• @GHfromMO, re, interestingly, ISO 31-11 prescribes $\mathrm e^t$ (but I don't like it either, and I agree the ‘standard’ is non-standard in the mathematics community). May 15 at 15:37

$$f(A)=\frac 1{A^2}\left(\Phi \left(\frac{1}{A},1,1+\frac{1}{A}\right)-\Phi \left(\frac{1}{A},1,2-\frac{1}{A}\right)\right)$$ where $$\Phi$$ is Lerch function.

• That's shorter, but elementary? Actually, I am not sure what the Lerch function is (I have a guess after googling, but who knows…)
– Dirk
May 15 at 9:17
• @Dirk. Whazt I suspect is that the OP started with specific values of $A$ which lead to Gaussian hypergeometric functions. Try the general case. Cheers :-) May 15 at 9:19
• Also $z^a\Phi(z,1,a)=B_z(a,0)$ with the Incomplete beta function May 15 at 18:45