設n是自然數,如果n、n+2、n+4都是質數,n是甚麼?

2008-03-18 7:28 pm
設n是自然數,如果n、n+2、n+4都是質數,n是甚麼?
我知道n係3,please俾個詳細解釋我~
thank you very much
更新1:

其實mod(n+4, 3)係咩意思? 我明mod m 既意思

回答 (2)

2008-03-18 10:55 pm
✔ 最佳答案
mod(n+4, 3) = mod(n+1, 3)
Since one of mod(n, 3), mod(n+1, 3), mod(n+2, 3) must be 0, therefore, exactly one of the numbers n, n+2, n+4 must be divisible by 3. If any of these number is bigger than 3 then it is not prime.
Therefore the only possible value for n is 3.

2008-03-18 21:57:47 補充:
只是不同的寫法吧
如果你明白 3 = 1 (mod 2),
那1 = mod(3, 2)是表達同樣的意思。

我不知道這是不是standard的寫法,但一般人都會這樣寫,尤其是讀computer science的比較習慣prefix notation。而且一般的理解mod(a, b)的數值都會選0<=mod(a,b)
參考: 從不抄襲。, 從不抄襲。
2008-03-18 10:50 pm
Consider n mod 3
(1) n = 1 (mod 3)
n+2 = 0(mod)3
n&gt;=4
n+2 &gt;=6
so no solution
(2) n = 2 (mod 3)
n+4 = 0 (mod 3)
n&gt;=2
n+4&gt;=6
so no solution
(3) n =0 (mod 3)
so n =3
n=3 ,n+2=5 ,n+4=7
So n =3
參考: nothing


收錄日期: 2021-04-23 17:47:03
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080318000051KK00702

檢視 Wayback Machine 備份