For a positive integer k, define the sequence {an}n≥0 such that a0=1 and for all positive integers n, an is the smallest positive integer greater than an−1 for which an≡kan−1(mod2017). What is the number of positive integers 1≤k≤2016 for which a2016=1+(22017)?Proposed by James Lin