Solving recurrence relation with floor and square root

149 Views Asked by At

I would like to solve the following recurrence: $$a_0 = 1$$ $$a_n = a_{n-1} + \lfloor\sqrt{a_{n-1}}\rfloor$$ Some observations I've made:

  • The sequence increases by a sequence of increasing numbers (obviously), with each positive integer being the difference between the terms of the sequence either twice or thrice, since $\frac{(m+1)^2 - m^2}{m} = 2 + \frac{1}{m}$

  • If $a_n = m^2$, then the relation above means means that $a_{n+k} = m^2 + km$, for $k = 0, 1, 2, 3$

However I cannot see how to generalize those observations further to get a closed form of the recurrence.