How can we show n^n = n (mod 8) if n > 0 is odd?

2016-06-20 3:43 pm
Thank you

回答 (2)

2016-06-20 4:07 pm
✔ 最佳答案
First, let's prove a simpler statement:
If n is odd, then n² ≡ 1 (mod 8)

Proof. Let n be odd. Then there exists an integer k ∈ Z such that n = 2k + 1. Thus we have
the following:

n² - 1 = (2k + 1)² - 1
= 4k² + 4k + 1 - 1
= 4k(k + 1)

Now consider the product k(k + 1). If k is even, then k(k + 1) is even. If k is odd, then k + 1
is even and hence k(k + 1) is even. Hence in either case k(k + 1) is even. So there exists ℓ ∈ Z
such that k(k + 1) = 2ℓ. Therefore we have n² − 1 = 4k(k + 1) = 4(2ℓ) = 8ℓ. Thus 8 | n² − 1,
so n² ≡ 1 (mod 8), for any odd value of n.

Let's go back to the original question. Another way to restate this is:
If n is an odd natural number, then n^n - n ≡ 0 (mod 8)

Factor out n:
n(n^(n-1) - 1) ≡ 0 (mod 8)

Obviously n is odd, so it can't be congruent to 0 (mod 8). But if we can show that n^(n-1) - 1 ≡ 0 (mod 8) we have proven the original statement.

Since n is odd, then n - 1 is even. So let's replace n-1 with 2m, where m is an integer.
n^(2m) - 1

That can be further changed into:
(n^m)² - 1

n is an odd number.
An odd number multiplied by an odd number is still odd.
So an odd number to an integer power is odd, hence n^m is always odd.

But we already showed above that n² is congruent to 1 (mod 8) and when we subtract 1 we get that the whole statement is congruent to 0 (mod 8).

Working backwards:
If n is an odd natural number, then:
n² ≡ 1 (mod 8)
n² - 1 ≡ 0 (mod 8)
(n^m)² - 1 ≡ 0 (mod 8)
(n^2m) - 1 ≡ 0 (mod 8)
(n^(n-1) - 1) ≡ 0 (mod 8)
n(n^(n-1) - 1) ≡ 0 (mod 8)
n^n - n ≡ 0 (mod 8)
n^n = n (mod 8)
2016-06-20 4:04 pm
n=2k+1 where k is an integer such that k>-1

n^n = (2k+1)^(2k+1)
= (2k+1)*((2k+1)^2)^k
= (2k+1)*((2^2*(k+1) + 1)^k
= (2k+1)*(1 + C(k,1)2^2*(k+1) + C(k,2)(2^2*(k+1))^2 + .. + C(k,k)(2^2*(k+1))^k)
= n + 2^3*n*(C(k,1)(k+1) + C(k,2)2^2*(k+1)^2 + ... + C(k,k)(2^2)^(k-1)*(k+1)^k)
= n + 8(nm)

m = C(k,1)(k+1) + C(k,2)2^2*(k+1)^2 + ... + C(k,k)(2^2)^(k-1)*(k+1)^k
is a positive integer.

n^n = n (mod 8)

-----------
C(p,q) = p!/(q!(p-q)!)


收錄日期: 2021-04-11 21:24:51
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20160620074308AAK6vLh

檢視 Wayback Machine 備份