We want ab∣a2017+b. This gives that a∣b. Therefore, we can set b=b2017a. Substituting this gives b2017a2∣a2017+b2017a, so b2017a∣a2016+b2017. Once again, we get a∣b2017, so we can set b2017=b2016a. Continuing this way, if we have bi+1a∣ai+bi+1, then a∣bi+1, so we can set bi+1=bia and derive bia∣ai−1+bi. Continuing down to i=1, we would have b=b1a2017 so ab1∣1+b1. If a≥3, then ab1>1+b1 for all b1≥1, so we need either a=1 or a=2. If a=1, then b∣b+1, so b=1. This gives the pair (1,1). If a=2, we need 2b∣b+22017. Therefore, we get b∣22017, so we can write b=2k for 0≤k≤2017. Then we need 2k+1∣2k+22017. As k≤2017, we need 2∣1+22017−k. This can only happen is k=2017. This gives the pair \left(2,2^{2017}\right).