1
$\begingroup$

Before I grind some algebra I was wondering if there was a known equation for a series of the form:

$$(x-y)+(x-2y)+(x-3y)+\dots+(x-ny) = T$$

Also a variant:

$$T-(q+y)-(q+2y)-(q+3y)-\dots-(q+ny) = 0$$

The first goes from $0$ to $T$ and the second from $T$ to $0$.

$x$, $y$, and $T$ are known for each instance, but change with each instance.

  • 2
    These are sums of arithmetic progressions, so yes, there are standard formulas.2012-05-10
  • 0
    $T$ is not the same in those two expressions, and if they are then $q=x-(n+1)y$2012-05-13

1 Answers 1

3

Answer changed to match corrected problem statement:

It really does just require knowledge of the formula for the triangular numbers:

$$\begin{align*} (x-y)+(x-2y)+\ldots+(x-ny)&=nx-y(1+2+\ldots+n)\\ &=nx-y\cdot\frac{n(n+1)}2\\ &=n\left(x-\frac{n+1}2y\right)\;, \end{align*}$$

and

$$\begin{align*} T-(q+y)-(q+2y)-\ldots-(q+ny)&=T-\Big(nq+y(1+2+\ldots+n)\Big)\\ &=T-\Big(nq+y\cdot\frac{n(n+1)}2\Big)\\ &=T-n\left(q+\frac{n+1}2y\right)\;. \end{align*}$$

  • 0
    Bah, went ahead and ground it out... First... $(nx)-((y)*(((n)*(n-1))/2))$ Second... $T-(nq)-((y)*((n*(n-1))/2))$2012-05-10
  • 0
    @Char: That should be $(n-1)x$ in the first and $(n-1)q$ in the second.2012-05-10
  • 0
    When I plug the numbers I get the results I am looking for without your (n-1) edits? Plus your eq gives unequal solutions for the same values. Try, T=900, x=380/3, and y=20/3,q=220/3.2012-05-10
  • 0
    @Char: Sorry, that was a typo: those should have been $n+1$, as in my answer. If you used $nx$ in the first one, you got the wrong answer: there are $n+1$ $x$ terms, not $n$ of them.2012-05-10
  • 0
    You try the values I suggested?2012-05-10
  • 0
    (n+1) in the first returns $T+x$, and in the second returns $-q$2012-05-10
  • 0
    @Char: I don't have to try any numerical values: the algebra is entirely unambiguous. If you're getting something other than $(n+1)\left(x-\frac{n}2y\right)$ for the first and $T-(n+1)\left(q-\frac{n}2y\right)$ for the second, you're not calculating the expressions that you gave in the question.2012-05-10
  • 0
    My bad, a typo in the question I failed to notice...2012-05-10