TITLE: Does sequence always give a square
QUESTION [5 upvotes]: Show that there exist a non-constant postive integer sequence $\{a_{n}\},a_{0}=1$ such that 
$$\dfrac{a^2_{n}+a_{n}}{2}-\dfrac{a^2_{n-1}+a_{n-1}}{2},\forall n\in\mathbb{N}$$ is always a perfect square.

REPLY [3 votes]: Let $a_n=\frac{3^n-1}2$ (so indeed $a_1=\frac{3^1-1}2=1$). Then
$$ \frac{a_n^2+a_n}2-\frac{a_{n-1}^2+a_{n-1}}2=\frac{3^{2n}-1}8-\frac{3^{2(n-1)}-1}8=3^{2(n-1)}=(3^{n-1})^2.$$