# Find missing number from sum of first few natural numbers

A child was asked to add the first few natural numbers $1+2+3+...$ as long as his patience permitted. As he stopped, he gave the sum as $575$. When the teacher declared the result wrong, the child discovered that he had missed a number in the sequence during addition. What was the number he missed?

-
Does the teacher know which number the child was adding up to? –  Michael Albanese Dec 25 '12 at 14:47
lol. I think its a way to frame the question. I too doubt on that same as you. =) –  harish.raj Dec 25 '12 at 14:49
If the teacher doesn't know the number, then my answer is accurate. If the teacher does know the number, the inequality $\frac{n(n+1)}{2} - 575 < n$ should be replaced by $\frac{n(n+1)}{2} - 575 \leq n$ as the reasoning in the bracket following the original inequality no longer applies. However, this does not change the final answer. –  Michael Albanese Dec 25 '12 at 15:12

We have $$1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}.$$ The numbers obtained from such sums are called Triangular numbers.

As the child's answer was $575$, the correct answer must be greater than $575$ (as he missed a number). The first triangular number greater than $575$ is $595$ corresponding to $n = 34$. If this was the sum he was trying to evaluate, the child must have missed $20 = 595 - 575$. However, if the correct answer was the next triangular number, $630$, corresponding to $n = 35$, the only way the child could have obtained $575$ is if he missed $55 = 630 - 575$, but this is not in the list of numbers $1, \dots, 35$ so he could not have been trying to add up the first $35$ natural numbers.

More generally, we need $\frac{n(n+1)}{2} > 575$ (the actual sum needs to be greater than the sum he obtained) and $\frac{n(n+1)}{2} - 575 < n$ (this difference tells us which value he missed, and it can't equal $n$ because then he would have written $1 + \dots + (n - 1)$ which is a triangular number, so the teacher could not have declared it wrong). Rewriting, we must find $n$ such that $$0 < \frac{n(n+1)}{2} - 575 < n\quad (\ast)$$ which only has solution $n = 34$. Therefore, we must be in the situation of the previous paragraph, so he missed the number $20$.

Added later: I just thought I'd add some details here about finding natural numbers $n$ which satisfy $(\ast)$.

First of all, consider the left hand inequality which rearranges to $f(n) := n^2 + n - 1150 > 0$. Solving $f(n) = 0$, we obtain $n = \frac{-1\pm\sqrt{4601}}{2}$; as $n > 0$, we ignore $n = \frac{-1-\sqrt{4601}}{2}$. Note that $\left\lfloor\frac{-1+\sqrt{4601}}{2}\right\rfloor = 33$, and we have $f(33) < 0$ and $f(34) > 0$. So $f(n) < 0$ for $n \in \{1, \dots, 33\}$ and $f(n) > 0$ for $n \geq 34$.

The right hand inequality rearranges to $g(n) := n^2 - n - 1150 < 0$. Solving $g(n) = 0$, we obtain $n = \frac{1\pm\sqrt{4601}}{2}$; as $n > 0$, we ignore $n = \frac{1-\sqrt{4601}}{2}$. Note that $\left\lfloor\frac{1+\sqrt{4601}}{2}\right\rfloor = 34$, and we have $g(34) < 0$ and $g(35) > 0$. So $g(n) < 0$ for $n \in \{1, \dots, 34\}$ and $g(n) > 0$ for $n \geq 35$.

Hence, $n = 34$ is the only natural number which satisfies $(\ast)$.

-
great explanation. Thank you a lot. –  harish.raj Dec 25 '12 at 14:31
+1 Michael: nice explanation! –  amWhy Dec 25 '12 at 14:35

Suppose he tried to sum the first $n$ positive integers. Omitting a term means this sum is less than the sum of the first $n$ positive integers but not less than the sum of the first $(n-1)$ positive integers. Hence, $\frac{n(n-1)}{2}\leq 575<\frac{n(n+1)}{2}$ so that $n=34$. This means the missing term is $595-575=20$.

-
awesome. can you elaborate a little about how you got the value of n? (it will be great if you do it in your answer itself) –  harish.raj Dec 25 '12 at 14:15