Bunuel wrote:
If n is a positive integer, what is the remainder when \(n^7 – n\) is divided by 42?
A. 0
B. 1
C. 3
D. 5
E. Cannot be determined.
First, we can factor the common n from each term:
n(n^6 - 1)
We now have a difference of squares, which can be factored:
n(n^3 - 1)(n^3 + 1)
We can factor (n^3 - 1) as a difference3 of cubes and (n^3 + 1) as a sum of cubes, obtaining:
n(n - 1)(n^2 + n + 1)(n + 1)(n^2 - n + 1)
Rearranging the factors, we have:
(n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1)
We see that (n - 1)(n)(n + 1) is a product of 3 consecutive integers, which is always divisible by 3! = 6. However, to be divisible by 42, it also needs to be divisible by 7 since 42 = 6 x 7. To see if the expression is divisible by 7, we can substitute n by all the remainders from division by 7 (i.e., 0, 1, 2, 3, 4, 5, 6):
If n = 0, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = 0, which is divisible by 7.
If n = 1, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = 0, which is divisible by 7.
If n = 2, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = (1)(2)(3)
(7)(3), which is divisible by 7.
If n = 3, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = (2)(3)(4)(13)
(7), which is divisible by 7.
If n = 4, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = (3)(4)(5)
(21)(13), which is divisible by 7.
If n = 5, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = (4)(5)(6)(31)
(21), which is divisible by 7.
If n = 6, (n - 1)(n)(n + 1)(n^2 + n + 1)(n^2 - n + 1) = (5)(6)
(7)(43)(31), which is divisible by 7.
As we can see, since all the values of n from 0 to 6, inclusive, yield a value of the expression that is divisible by 7, we see that n^7 - n is divisible by both 6 and 7, which makes it divisible by 42. Thus, the remainder when the expression is divided by 42 is 0.
[Note: The reason we can just use the 7 remainders from division by 7 is that all other integers will “behave” like one of these 7 remainders. For example, if n = 15 and since 15/7 = 2 R 1, 15 “behaves” like 2.]
Answer: A(n-1)n(n+1) is always divisible by 3 and 2. So we got T = n^7-n is divisible by 6.
With divisibility by 7: n can have 6 remainders when divided by 7: r(emainder) = {0; 1; 2; 3; 4; 5; 6}
r = 1. (n-1) is divisible by 7. T is divisible by 42
r = 2. n = 7k+2. So n^2 +n +1 = ... + 2^2 + ... + 2 + 1 = 7. So T is divisible by 42.
r = 3. n = 7k+3. So n^2 - n +1 = ... + 3^2 - ... - 3 + 1 = 7. So T is divisible by 42.
r =4. n = 7k+4. So n^2 + n +1 = ... + 4^2 + ... + 4 + 1 = 21. So T is divisible by 42.
r =5. n = 7k+5. So n^2 - n +1 = ... + 5^2 - ... - 5 +1 = 21. So T is divisible by 42.
r =6. (n+1) is divisible by 7. So T is divisible by 42.