Answer
$d=-2$.
$a_1= 28$,
$a_n= a_{n-1}-2$.
$a_n= 30-2n$
Work Step by Step
1. Based on the given conditions, we have $a_{15}=a_1+14d=0$ and $a_{40}=a_1+39d=-50$, thus $25d=-50$ and $d=-2$.
2. We can find the first term $a_1=0-14(-2)=28$, and a recursive formula $a_n=a_{n-1}+d=a_{n-1}-2$.
3. We can find a formula for the nth term $a_n=a_1+(n-1)d=28+(n-1)(-2)=30-2n$