# Find a sequence $(a_n)$ such that $\frac{a_{n}}{a_{n+1}} = 1 + \frac{1}{n} + \frac{p}{n \ln n} + O\left(\frac{1}{n \ln^{2}n}\right)$ [closed]

What would be an example of a real valued sequence $\{a_{n}\}_{n=1}^{\infty}$ such that $$\frac{a_{n}}{a_{n+1}} = 1 + \frac{1}{n} + \frac{p}{n \ln n} + O\left(\frac{1}{n \ln^{2}n}\right)\ ?$$

Hint:

$$1+\frac1n+\frac p{n\ln(n)}=\frac{(n+1)\left(\ln^p(n)+\frac p{n+1}\ln^{p-1}(n)\right)}{n\ln^p(n)}$$

And,

$$\left(\ln(n)+\frac1{n+1}\right)^p=\ln^p(n)+\frac p{n+1}\ln^{p-1}(n)+\mathcal O\left(\frac{\ln^{p-2}(n)}{n^2}\right)$$

And,

$$\ln(n)+\frac1{n+1}=\ln(n)+\int_n^{n+1}\frac1x~\mathrm dx+\mathcal O(1/n^2)=\ln(n+1)+\mathcal O(1/n^2)$$

Hence, we end up with

$$\frac{1/a_{n+1}}{1/a_n}=\frac{(n+1)\ln^p(n+1)}{n\ln^p(n)}+\mathcal O(1/n\ln^2(n))$$

You can perform some reverse-engineering to find such one. Indeed, if $(a_n)$ satisfies the given asymptotics then

\begin{align*} \log a_{n+1} &= \log a_1 + \sum_{k=1}^{n} (\log a_{k+1} - \log a_k) \\ &= \log a_1 - \sum_{k=1}^{n} \left( \frac{1}{k} + \frac{p}{k\log k} + \mathcal{O}\bigg( \frac{1}{k\log^2 k}\bigg) \right) \\ &= - \log n - p \log(\log n) + \mathcal{O}(1). \end{align*}

This tells that we may choose

$$a_n = \exp\{ - \log n - p \log(\log n) \} = \frac{1}{n \log^p n}.$$