sum up $\sum\limits_{i=0}^n\ln(i^2+a)b^i$ How to sum up  $\sum\limits_{i=0}^n \ln(i^2+a) b^i$, getting a simple analytical formula, where $a>0, 0<b<1$.
I guess it has something to do with $\arctan$ for the same form they have. Here I show the curve of the sum function when $a=1$ and $b=0.99$.

In addition, the series expansions of $\ln(x)$ and $\arctan(x)$ are similar, which may also indicate that these two functions are related. But I only found such a relationship between $\ln(x)$ and $\arctan(x)$, $\arctan(x)=\frac{1}{2i}\ln(\frac{x-i}{x+i})+q$, and there are imaginary numbers $i$.
Of course, it may be not right to try to simplify this summation formula to arctan function...
Can anyone give some advice?
 A: Let
$$ 
S(a)=\sum_{n=0}^N b^n \ln(a^2+n^2)=\sum_{n=0}^N b^n \ln \left(a^2(1+(n/a)^2 \right) \\
S(a)=\sum_{n=0}^N b^n \ln(a^2)+\sum_{n=0}^N b^n \ln \left (1+(n/a)^2 \right)
$$
The first sum on the right is a geometric sum. We will first investigate the sum to infinity.
$$
S(a)=\frac{\ln(a^2)}{1-b}+\sum_{n=0}^\infty b^n \ln \left (1+(n/a)^2 \right)
$$
Let $t_n=n/a$
$$
\sum_{n=0}^\infty b^n \ln \left (1+(n/a)^2 \right)=a\sum_{n=0}^\infty b^{at} \ln(1+t^2) \frac{1}{a}
$$
Since $1/a=t_{n+1}-t_n$, we now have a Riemann sum that may be written as an integral for $a \to \infty$.
$$
T(a)=a\int\limits_0^{\infty} dt \ b^{at} \ln(1+t^2)
$$
With the assistance of Mathematica we find
$$
T(a)=\frac{1}{\ln(b)} \left\{ 2 \cos(a \ln b) \operatorname{ci}(-a\ln b) + \sin(a \ln b) \left[ \pi +2 \operatorname{si}(a\ln b) \right] \right\}
$$
Where $\operatorname{si}$ and $\operatorname{ci}$ are the sine and cosine integrals.  Thus we have, for fixed $b$
$$
S(a) \sim \frac{\ln(a^2)}{1-b}+T(a) \ \ , \ \ a \to \infty 
$$
Here is a plot of the approximation versus the exact finite sum, with $a=2$, $b=0.6$:

Here is a plot of the approximation and exact sum to infinity$^\dagger$, with $b=0.999$, $b=0.001$, and for 'large' values of $a$ up to unity:

Notice that if $b \to 0, T \to 0$ while $\frac{\ln(a^2)}{1-b} \to \ln(a^2)$, thus we also have
$$
S(a) \sim \frac{\ln(a^2)}{1-b} \ \ , \ \ a \to \infty \ \ , \ \ b \to 0
$$
It turns out this is good when either $a \to \infty$ or $b \to 0$. I think the error here is $O(1/a(\ln b)^2)$. Here is a plot of this leading order term as a function of $b$:

If you want only elementary functions, we can expand $T(a)$ in terms of the large parameter $(-a \ln b)$ to find the next term
$$
S(a) \sim \frac{\ln(a^2)}{1-b}- \frac{2}{(a \ln b)^3} \ \ , \ \ a \to \infty \ \ , \ \ a \ln b \to -\infty
$$
The finite sum may be performed similarly. I find
$$
S(a) \sim \ln(a^2) \frac{1-b^{N+1}}{1-b}+   \frac{b^{-ia}}{\ln(b)} \left\{ \operatorname{Ei} (\small{ ia\ln b})+b^{ai+N} \ln(1+(a/N)^2) \\ +b^{2ia}\left[ \operatorname{Ei}( \small{-ia \ln b} )- \operatorname{Ei}( \small{ (N-ia )  \ln b}) \right] - \operatorname{Ei}( \small{(ai+N) \ln b}) \right\} \ \ \ , \ \ \ a \to \infty
$$
Where $\operatorname{Ei}$ is the exponential integral, and $b$ is fixed. Using just the first term on the right:

$\dagger$ Mathematica evaluates the infinite sum as derivatives of the Lerch Phi function
$$
\sum_{n=0}^\infty b^n \ln(a^2+n^2)= -\Phi^{0,1,0}(b,0,-ia)-\Phi^{0,1,0}(b,0,ia)
$$
Beware! The expression on the right has a nonzero imaginary part. The real part is equal to the sum on the left, and is what I'm using in plots for the 'exact sum to infinity'.
