MHB How Does the Sum Formula for Sequence in POTW #113 Work?

  • Thread starter Thread starter anemone
  • Start date Start date
AI Thread Summary
The discussion focuses on deriving a formula for the sum of the first n terms of the sequence 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, etc. The key result is the formula for P(n), which is proven to satisfy the relationship P(x+y) - P(x-y) = xy for positive integers x and y, where x > y. Multiple members contributed solutions, with lfdahl providing the primary solution and Opalg offering an alternate approach. The thread emphasizes the mathematical reasoning behind the formula and its proof. Overall, the discussion highlights the importance of understanding sequence summation and its implications in number theory.
anemone
Gold Member
MHB
POTW Director
Messages
3,851
Reaction score
115
Let $P(n)$ be the sum of the first $n$ terms of the sequence $0,\,1,\,1,\,2,\,2,\,3,\,3,\,4,\,4,\,5,\,5,\,6,\,6,\,\cdots$

Find a formula for $P(n)$ and prove that $P(x+y)-P(x-y)=xy$, where $x,\,y$ are positive integers and $x>y$.
--------------------
Remember to read the http://www.mathhelpboards.com/showthread.php?772-Problem-of-the-Week-%28POTW%29-Procedure-and-Guidelines to find out how to http://www.mathhelpboards.com/forms.php?do=form&fid=2!
 
Physics news on Phys.org
Congratulations to the following members for their correct solutions!:)

1. lfdahl
2. mente oscura
3. Opalg
4. kaliprasad

Solution from lfdahl:
$P(n)$ has the form:
\[P(n) = \left\{\begin{matrix} \frac{n^2}{4}, & n\: \: even \\\\ \frac{n^2-1}{4}, & n \: \: odd & \end{matrix}\right.\]

There are two cases (with $x > y$):

(a). $x$ even and $y$ even or $x$ odd and $y$ odd: $x+y$ and $x-y$ are both even.

(b). $x$ odd and $y$ even or $x$ even and $y$ odd: $x+y$ and $x-y$ are both odd.Ad. (a):

\[P(x+y)-P(x-y)=\frac{1}{4}\left ( (x+y)^2-(x-y)^2 \right )=\frac{1}{4}4xy = xy \]Ad. (b):

\[P(x+y)-P(x-y)=\frac{1}{4}\left ( (x+y)^2-1-(x-y)^2+1 \right )=\frac{1}{4}4xy = xy \]

Alternate solution from Opalg:
$P(2n+1)$ is twice the sum of the numbers from $1$ to $n$, namely $n(n+1)$. Also, the $(2n+1)$th term of the sequence is $n$. It follows that $P(2n) = n(n+1) - n = n^2$. To get a formula that applies to both the even and odd cases, we can re-write these as follows: $$ P(2n+1) = n(n+1) = \tfrac14\bigl((2n+1)^2 - 1\bigr) = \tfrac18\bigl(2(2n+1)^2 - 1 - 1),$$ $$ P(2n) = n^2 = \tfrac14\bigl((2n)^2\bigr) = \tfrac18\bigl(2(2n)^2 - 1 + 1\bigr).$$ Combine those two formulas to see that $P(x) = \tfrac18\bigl(2x^2 - 1 + (-1)^x\bigr),$ whether $x$ is even or odd.

Therefore $$P(x+y) - P(x-y) = \tfrac18\bigl(2(x+y)^2 -1 + (-1)^{x+y} - 2(x-y)^2 + 1 - (-1)^{x-y}\bigr) = \tfrac18\bigl(8xy + (-1)^x\bigl((-1)^y - (-1)^{-y}\bigr)\bigr).$$ But $(-1)^y = (-1)^{-y}$. Thus $(-1)^x\bigl((-1)^y - (-1)^{-y}\bigr) = 0$ and so $P(x+y) - P(x-y) = \frac18(8xy) = xy.$
 
Back
Top