Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

If I have:
\begin{align*} N &\equiv 1 &\pmod{2}\\ N &\equiv 2 &\pmod{3}\\ N &\equiv 3 &\pmod{4}\\ &\vdots\\ N &\equiv n - 1 &\pmod{n} \end{align*} How could I solve for $N$? Is there any property relates to this problem?

Update
Base on Moron hint, we have:
\begin{align*} N + 1 &\equiv 0 &\pmod{2}\\ N + 1 &\equiv 0 &\pmod{3}\\ N + 1 &\equiv 0 &\pmod{4}\\ \vdots\\ N + 1 &\equiv 0 &\pmod{n} \end{align*} Hence, $$N + 1 \equiv 0 \pmod{\mathrm{lcm}(2\cdot 3\cdots n}$$

$$\therefore N + 1 = lcm(2.3.4...n) * k \text{ for some integers k } $$ $$\implies N = lcm(2.3.4...n) * k - 1$$

Does it look right?

Thanks,
Chan

share|improve this question
2  
$N = k \times \text{lcm}(1,2,\ldots,n)-1$ where $k \in \mathbb{Z}$ –  user17762 Feb 28 '11 at 0:04
2  
    
@Sivaram Ambikasaran: Thanks, but could you explain how it works? I know there is a property for $\pmod{lcm}$, but in this case the right hand side parts are different. It goes from 1 -> n - 1. –  Chan Feb 28 '11 at 0:08
    
@Qiaochu Yuan: Thanks for the link –  Chan Feb 28 '11 at 0:10
    
@Chan: As Qiaochu points out this is nothing but a special case of Chinese Remainder Theorem. your $N \equiv -1 \bmod m$, $\forall m \in \{1,2,\ldots,n\}$ –  user17762 Feb 28 '11 at 0:11
show 2 more comments

1 Answer

up vote 4 down vote accepted

Hint: Consider the possible values for $N+1$.

share|improve this answer
    
I got it ;) So simple. Many thanks. –  Chan Feb 28 '11 at 0:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.