Answer
$a_n=5n-4$,
Work Step by Step
1. Start with a general form $a_n=a_1+(n-1)d$, based on the given conditions, we have: $31=a_1+(7-1)d$ or $31=a_1+6d$
2. and $96=a_1+(20-1)d$ or $96=a_1+19d$
3. Take the difference of the above two equations to get $13d=65$, thus $d=5$
4. Find $a_1=31-6(5)=1$
5. The general form is $a_n=1+5(n-1)=5n-4$,