MathDB
Sequence

Source: China Second Round 2017(A), Test 2, Problem 2

February 22, 2018
algebraSequence

Problem Statement

Given a sequence {an}\{a_n\}: 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 rr satisfying ar<r32017a_r<r\le 3^{2017}.