1

I got this question.

If I climb $2$ stairs at a time, $1$ is left over.
If I climb $3$ stairs at a time, $2$ are left over.
If I climb $4$ stairs at a time, $3$ are left over.
If I climb $5$ stairs at a time, $4$ are left over.
If I climb $6$ stairs at a time, $5$ are left over.
If I climb $7$ stairs at a time, $6$ are left over.
How many stairs are there?


I attempted solving like this:

$x\equiv1\pmod2$

$x\equiv2\pmod3$

$\vdots$

$x\equiv6\pmod7$

So now I have a system of six equivalences. I concluded that the unit digit of $x$ would be $9$, but could go no further.

I have heard of the Chinese Remainder Theorem, which helps in solving such problems, but the Wikipedia example is convoluted and I do not get the right answer.


Our teacher solved like this:

Each number gives remainder $1$, so $\text{LCM}[2,3,4,5,6,7]$ should also give remainder 1. Therefore, answer is $420-1=419$.

How does this work? Is this even correct?

Parcly Taxel
  • 103,344
DynamoBlaze
  • 2,781
  • Note that the Chinese remainder theorem requires that the $n_i$'s are pairwise coprime, which is not satisfied here. Note that $x $ leaves a remainder of $-1$ in each case, so just take the LCM of the numbers $2$ to $7$ and subtracting $1$ should give you the correct answer. –  Dec 09 '17 at 06:49

1 Answers1

1

The idea is to rewrite the congruences as $$x\equiv-1\bmod2,3,4,5,6,7$$ and it is now clear that the solutions are $-1+\operatorname{lcm}(2,3,4,5,6,7)k$ for $k\in\mathbb Z$. Therefore the smallest positive solution is 419, as the teacher derived.

Parcly Taxel
  • 103,344