Question 956360
<pre>
Start with this sum formula for an arithmetic sequence:

{{{S[n]=expr(n/2)(2a[1]+(n-1)^""d)}}}

Substitute S<sub>n</sub>, a<sub>1</sub> and d in this formula
and solve.  It should factor if there is a solution.  

Using the letters and the quadratic formula, I got this:

{{{n = (d-a[1] +- sqrt((a[1]-d)^2+8dS[n]))/(2d)}}}

At least one of those two solutions (using either the + or the -) 
will give a positive whole number for n, if there is a solution.

Then substitute that value of n along with a<sub>1</sub> and d
into the general term formula:

{{{a[n]=a[1]+(n-1)d}}}  

In some cases there may be two solutions.

Edwin</pre>