Problem 955
Finding Triangles
A sequence $(a_n)_{n \ge 0}$ starts with $a_0 = 3$ and for each $n \ge 0$,
- if $a_n$ is a triangle number, then $a_{n + 1} = a_n + 1$;
- otherwise, $a_{n + 1} = 2a_n - a_{n - 1} + 1$.
A triangle number is a number of the form $m(m + 1)/ 2$ for some integer $m$.
The sequence begins:
$${\color{red}3}, 4, {\color{red}6}, 7, 9, 12, 16, {\color{red}21}, 22, 24, 27, 31, {\color{red}36}, 37, 39, 42, \dots$$
where triangle numbers are marked red.
The $10$th triangle number in the sequence is $a_{2964} = 1439056$.
Find the index $n$ such that $a_n$ is the $70$th triangle number in the sequence.
寻找三角形数
数列$(a_n)_{n \ge 0}$从$a_0 = 3$开始,且对于每个$n \ge 0$:
- 如果$a_n$是一个三角形数,那么$a_{n + 1} = a_n + 1$;
- 否则,$a_{n + 1} = 2a_n - a_{n - 1} + 1$。
三角形数是形如$m(m + 1)/ 2$的数,其中$m$为整数。
该数列的前几项为:
$${\color{red}3}, 4, {\color{red}6}, 7, 9, 12, 16, {\color{red}21}, 22, 24, 27, 31, {\color{red}36}, 37, 39, 42, \dots$$
其中的三角形数被标记为红色。
数列中第$10$个三角形数是$a_{2964} = 1439056$。
求数列中第$70$个三角形数的下标$n$。