TITLE: Does $|n^2 \cos n|$ diverge to $+\infty$?
QUESTION [53 upvotes]: I was recently exposed to the problem of deciding whether
$$ \lim_{n \to +\infty} |n \cos n| = +\infty$$
where the limit is taken over the integers. As $|\cos n|$ oscillates throughout the interval $[0,1]$, it seems plausible that every real number ought to be a limit point of this sequence. But to show the limit doesn't exist, it's enough to show the sequence is less than $2$ infinitely often, and this can be done with continued fractions: we can find arbitrarily large $p$ and $q$ with $q$ odd such that
$$ \left| \frac{\pi}{2} - \frac{p}{q} \right| < \frac{1}{q^2} $$
which implies
$$ \left| \frac{q-1}{2} \pi + \frac{\pi}{2} - p \right| < \frac{1}{q} $$
making $p$ a good approximation of $\pi/2$ modulo $\pi$, and thus
$$ \left| p \cos p \right| < \frac{p}{q} < 2 $$
This method fails if we consider instead the sequence $n^{1+\epsilon} \cos n$, since the final inequality is an increasing function of $n$. In fact, a heuristic statistical argument suggests that
$$ \lim_{n \to +\infty} |n^{1 + \epsilon} \cos n| = +\infty $$
really does hold: imagine the $n$'s are actually uniformly randomly selected from $[0, \pi]$, there is a roughly $2p/\pi$ chance that $|\cos n| < p$. For any positive constant $B$, the expected number of terms of $n^{1 + \epsilon} |\cos n|$ which are less than $B$ is
$$ \sum_{n=1}^{+\infty} \frac{2B}{\pi n^{1 + \epsilon}} $$
which, in particular, is finite.
Of course, this is just heuristic. Does anyone know of a proof or disproof of the conjecture
$$ \lim_{n \to +\infty} |n^{1 + \epsilon} \cos n| = +\infty $$
for positive real numbers $\epsilon$, where the limit is taken only over integers?
EDIT: Since there have been a few erroneous answers, I'll point out that observing $|\cos n|$ oscillates from 0 to 1 is not enough to show the limit does not exist. Consider the sequence $g(n)$ defined by

$g(0) = 1$
$g(n) = \max\{ g(n-1), n / |\cos n| \} + 1$

Then $g(n)$ is an unbounded increasing sequence such that $|g(n) \cos n| > n$ for all $n$, and thus
$$ \lim_{n \to +\infty} |g(n) \cos n| = +\infty $$
Roughly speaking, $g(n)$ diverges to $+\infty$ faster than $n \pmod \pi$ can approximate $\pi / 2$.
The question of this post is whether $n^2$ (or $n^{1 + \epsilon}$) also diverges to $+\infty$ fast enough.

REPLY [22 votes]: (editor's note: I've moved the original second section to the top, since the original first section answered the wrong question)
Edit: I missed the exponent of $2$.
Obviously $(6)$ implies, $\displaystyle\limsup_{n\to\infty}|n^2\cos(n)|=\infty$. However, evaluating $\displaystyle\liminf_{n\to\infty}|n^2\cos(n)|$ is much more difficult. A difficult result is that the irrationality measure of $\frac\pi2$ is less than $8.01604539$. This means that for all but a finite number of rational approximations,
$$
\left|\frac{p}{q}-\frac\pi2\right|\ge\frac1{q^{8.01604539}}\tag{7}
$$
To make the estimate in $(3)$ yield an infinite limit, we would need to show that the irrationality measure of $\frac\pi2$ is less than $3$. Wikipedia says that "The exact irrationality measure of $\pi$ is not known, however in $2008$ Salikhov has given the approximation $7.6063$." This would mean that $\displaystyle\lim_{n\to\infty}|n^2\cos(n)|$ does not exist.

As was shown in this answer, we can find an infinite number of continued fraction approximations of $\frac\pi2=\frac{p}{q}$ with $q$ odd and so that
$$
\left|p-q\frac\pi2\right|\le\frac1q\tag{1}
$$
For approximations as in $(1)$, we have, by Maclaurin Expansion,
$$
(-1)^{(q-1)/2}\cos(p)=-\left(p-q\frac\pi2\right)+O\left(p-q\frac\pi2\right)^3\tag{2}
$$
Taking $\liminf$, we get
$$
\begin{align}
\liminf_{p\to\infty}|p\cos(p)|
&\le\lim_{p\to\infty}p\cdot\frac{1}{q}\\
&=\frac{\pi}{2}\tag{3}
\end{align}
$$
In a similar fashion, we can find an infinite number of continued fraction approximations of $\pi=\frac{p}{q}$ so that
$$
\left|p-q\pi\right|\le\frac1q\tag{4}
$$
For approximations as in $(4)$, we have, by Maclaurin Expansion,
$$
(-1)^q\cos(p)\ge1-\frac12\left(p-q\pi\right)^2\tag{5}
$$
Taking $\limsup$, we get
$$
\begin{align}
\limsup_{p\to\infty}|p\cos(p)|
&\ge\lim_{p\to\infty}p\left(1-\frac{1}{2q^2}\right)\\
&=\infty\tag{6}
\end{align}
$$
Thus, $\displaystyle\liminf_{n\to\infty}|n\cos(n)|\le\frac\pi2$ and $\displaystyle\limsup_{n\to\infty}|n\cos(n)|=\infty$. Therefore, the limit does not exist.