Max value for initial term of a sequence This is a nice math-contest problem. I was thinking it a few days ago, but I didn't get anything.
Let $\{a_n\}_{n\ge1}\subseteq\mathbb{N}$ such that for all $n$ we have $n|a_n$ and $|a_n-a_{n+1}|\le4$. What is the maximum value that $a_1$ takes?
It is clear that for any $m\in\mathbb{N}$, since $1|m$ then we can take $a_1=m$, so the first part is satisfied.  Therefore, I think it is better to concentrate in $a_2$ than $a_1$. On the other hand, $a_{n+1}=a_n\pm k_n$ for some $k_n\in\{0,1,2,3,4\}$ for all $n$.
But I don't know how to combine both ideas. 
 A: For each $n\in\mathbb{N}$, there is $\alpha_n\in\mathbb{N}$ such that $a_n=n\alpha_n$. Thus $4\ge|(n+1)\alpha_{n+1}-n\alpha_n|...(*)$ for all $n$. Now, for $n\ge 4$, it is easy to chech that $\alpha_{n+1}\le \alpha_n$. So $\{\alpha_n\}_{n\ge4}$ is eventually constant. That is, there is $k\ge4$ and $\alpha\in \mathbb{N}$ such that $\alpha_n=\alpha$ for $n\ge k$. Putting $n=k$ in $(*)$ we get $\alpha\in\{1,2,3,4\}$.
Lert $N=\min\{n\in\mathbb{N}\,:\,n\ge9,\alpha_m=\alpha\mbox{ for all }m\ge n\}$. It is easy to see that $N$ exists, and $\alpha_{N-1}\neq \alpha$. Now, in $(*)$ put $n+1=N$, so $4\ge|N\alpha_{N}-(N-1)\alpha_{N-1}|=|N\alpha-(N-1)\alpha_{N-1}|$. That is $-4+N\alpha\le(N-1)\alpha_{N-1}\le4+N\alpha...(**)$.\
If $N>9$, since $\alpha\le4$, then $N-\alpha>5$, so $N\alpha+N-\alpha-1>N\alpha+4$. Therefore, by $(**)$ we have $(N-1)(\alpha+1)>N\alpha+4\ge(N-1)\alpha_{N-1}$. Thus $\alpha_{N-1}<\alpha+1$. In the same way, we obtain $\alpha-1<\alpha_{N-1}$, so $\alpha_{N-1}=\alpha$, which contradicts definition of $N$.
We conclude $N=9$, so $\alpha_n=\alpha$ for all $n\ge9$. That is $a_n=\alpha n$ for all $n\ge9$, and since $\alpha=1,2,3,4$, then $a_9=9,18,27,36$.
Now, going down we conclude that $58$ is the desired value.
