Sequence
Source: China Second Round 2017(A), Test 2, Problem 2
February 22, 2018
algebraSequence
Problem Statement
Given a sequence : a_1=1, a_{n+1}=\left\{
\begin{array}{lcr}
a_n+n, a_n\le n, \\
a_n-n, a_n>n,
\end{array}
\right.
n=1,2,\cdots.
Find the number of positive integers satisfying .