162. 16220-!-item-!-187;#058&011014
If n is a positive integer and r is the remainder when n2 - 1 is divided by 8, what is the value of r ?
(1) n is odd.
連續數的觀念很重要哩!!
假設n = 2k+1
(2k+1)^2 - 1 => 4k^2 + 4k + 1 - 1 => 4k^2 + 4k
=> 4k(k+1) => 4*k*(k+1) <== k與k+1是連續數, 所以連續數必有一個是偶數
因此k*(k+1)必可以donate一個2出來, 導致4*k*(k+1)會有一個8的factor,
sufficient
(2) n is not divisible by 8.
n=8k+1
n=8k+2
n=8k+3
...
n=8k+7
you never know the remainder.
insufficient