COMC 2017 B Problem 4

Numbers a, b and c form an arithmetic sequence if b-a=c-b. Let a, b, c be positive integers forming an arithmetic sequence with a<b<c. Let f(x)=a x^{2}+b x+c. Two distinct real numbers r and s satisfy f(r)=s and f(s)=r. If r s=2017, determine the smallest possible value of a.