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

  • Context: High School 
  • Thread starter Thread starter anemone
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
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.$