1. First, we note that 840=3⋅5⋅7⋅8. We need to find the integers n such that 0≤n<840 and 840 divides n8−n4+n−1. This means we need n8−n4+n−1≡0(mod840).
2. We will consider the congruences modulo 3, 5, 7, and 8 separately.
3. Modulo 3:
- Since n2≡1(mod3) for n such that gcd(n,3)=1, we have:
n8≡1(mod3),n4≡1(mod3)
n8−n4+n−1≡1−1+n−1≡n−1(mod3)
Therefore, n≡1(mod3).
4. Modulo 5:
- Since n4≡1(mod5) for n such that gcd(n,5)=1, we have:
n8≡1(mod5),n4≡1(mod5)
n8−n4+n−1≡1−1+n−1≡n−1(mod5)
Therefore, n≡1(mod5).
5. Modulo 8:
- Since φ(8)=4, we have n4≡1(mod8) for n such that gcd(n,8)=1, we have:
n8≡1(mod8),n4≡1(mod8)
n8−n4+n−1≡1−1+n−1≡n−1(mod8)
Therefore, n≡1(mod8).
6. Modulo 7:
- Since n6≡1(mod7), we have:
n8≡n2(mod7),n4≡n2(mod7)
n8−n4+n−1≡n2−n2+n−1≡n−1(mod7)
Therefore, n≡1(mod7) or n≡3(mod7).
7. Combining the congruences using the Chinese Remainder Theorem:
- For n≡1(mod3), n≡1(mod5), n≡1(mod8), and n≡1(mod7):
n≡1(mod840)
This gives us n=1.
- For n≡1(mod3), n≡1(mod5), n≡1(mod8), and n≡3(mod7):
Using the Chinese Remainder Theorem, we find another solution n in the interval 0≤n<840.
8. Therefore, there are two solutions in total.
The final answer is 2.