Finding a term in a sequence A strictly increasing sequence of positive integers $a_1, a_2, a_3,...$ has the property that for every positive integer $k$, the subsequence $a_{2k-1}, a_{2k}, a_{2k+1}$ is geometric and the subsequence $a_{2k}, a_{2k+1}, a_{2k+2}$ arithmetic. If $a_{13}=539$. Then how can I find $a_5.$
Any help will be appreciated.
Thank you.

Hint: Let $a_1=a,a_2=ka$. Then it is not hard to show that $a_{2n+1}=a(nk-n+1)^2$. We have $539=11\cdot7^2$, so evidently we take $k=2,a=11$. That gives $a_5=11(2\cdot 2-1)^2=99$.
