31. 证明: $30|(6n^5+15n^4+10n^3-n)$.
Posted by haifeng on 2019-11-04 22:01:29 last update 2019-11-04 22:01:29 | Answers (1) | 收藏
证明: $30|(6n^5+15n^4+10n^3-n)$.
Posted by haifeng on 2019-11-04 22:01:29 last update 2019-11-04 22:01:29 | Answers (1) | 收藏
证明: $30|(6n^5+15n^4+10n^3-n)$.
Posted by haifeng on 2019-11-04 21:28:05 last update 2019-11-04 21:28:05 | Answers (1) | 收藏
证明: $9|(n^3+(n+1)^3+(n+2)^3)$.
Posted by haifeng on 2019-09-23 21:12:43 last update 2019-09-23 21:12:43 | Answers (0) | 收藏
569936821221962380720^3 + (-569936821113563493509)^3 + (-472715493453327032)^3 == 3
References:
数论群
Posted by haifeng on 2019-09-21 09:47:10 last update 2019-09-21 15:05:06 | Answers (0) | 收藏
形如 $2^n-1$ 的数, 如果是素数, 则称为梅森素数(Mersenne prime).
由于当 $n$ 是合数时, 比如 $n=pq$, 则 $2^{pq}-1$ 总可以分解. 具体的, 若 $q=2k$, 则有 $2^{2pk}-1=(2^{pk}-1)(2^{pk}+1)$. 若 $q=2k+1$, 则含有因子 $2^p-1$. 因此 $2^n-1$ 称为素数的必要条件是 $n$ 是素数.
一般记梅森素数为 $M_p=2^p-1$, 其中 $p$ 为素数. 目前已知的梅森素数有
No. | $p$ | $M_p$ | isPrime |
---|---|---|---|
1 | 2 | $2^2-1=3$ | Y |
2 | 3 | $2^3-1=7$ | Y |
3 | 5 | $2^5-1=31$ | Y |
4 | 7 | $2^7-1=127$ | Y |
11 | $2^{11}-1=2047$ | N | |
5 | 13 | $2^{13}-1=8191$ | Y |
6 | 17 | $2^{17}-1=131071$ | Y |
7 | 19 | $2^{19}-1=524287$ | Y |
23 | $2^{23}-1=8388607$ | N | |
29 | $2^{29}-1=536870911$ | N | |
8 | 31 | $2^{31}-1=2147483647$ | Y |
以下仅列出梅森素数
No. | $p$ | $M_p$ | Value |
---|---|---|---|
9 | 61 | $2^{61}-1$ | 2305843009213693951 |
10 | 89 | $2^{89}-1$ | 618970019642690137449562111 |
11 | 107 | $2^{107}-1$ | 162259276829213363391578010288127 |
12 | 127 | $2^{127}-1$ | 170141183460469231731687303715884105727 |
13 | 521 | $2^{521}-1$ | |
14 | 607 | $2^{607}-1$ | |
15 | 1279 | $2^{1279}-1$ | |
16 | 2203 | $2^{2203}-1$ | |
17 | 2281 | $2^{2281}-1$ | |
18 | 3217 | $2^{3217}-1$ | |
19 | 4253 | $2^{4253}-1$ | |
20 | 4423 | $2^{4423}-1$ |
使用 Calculator.exe 验证: isprime(2^3217-1)
>> isprime(2^3217-1)
in> isprime(2^3217-1)
in> 2^3217-1
out> 259117086013202627776246767922441530941818887553125427303974923161874019266586362086201209516800483406550695241733194177441689509238807017410377709597512042313066624082916353517952311186154862265604547691127595848775610568757931191017711408826252153849035830401185072116424747461823031471398340229288074545677907941037288235820705892351068433882986888616658650280927692080339605869308790500409503709875902119018371991620994002568935113136548829739112656797303241986517250116412703509705427773477972349821676443446668383119322540099648994051790241624056519054483690809616061625743042361721863339415852426431208737266591962061753535748892894599629195183082621860853400937932839420261866586142503251450773096274235376822938649407127700846077124211823080804139298087057504713825264571448379371125032081826126566649084251699453951887789613650248405739378594599444335231188280123660406262468609212150349937584782292237144339628858485938215738821232393687046160677362909315071
2^3217-1 is a Mersenne number, we use Lucas-Lehmer test.
2^3217-1 is a Mersenne prime.
------------------------
用时大约3分钟
References:
https://www.mersenne.org/primes/
Posted by haifeng on 2019-09-11 08:32:22 last update 2019-09-11 09:42:23 | Answers (0) | 收藏
我们都知道 $\frac{5}{6}=0.833333\cdots$, $\frac{5}{3}=1.666666\cdots$
\[
\dfrac{\frac{5}{6}}{\frac{3}{6}}=\frac{5}{3}\Rightarrow\ 0.833333\cdots=1.666666\cdots\times 0.5
\]
现在如果两边都取小数点后有限位(比如 $n$ 位), 固然有 $0.833\cdots 3=1.66\cdots 6\times 0.5$, 但有没有这样一种情况, 当 $1.66\cdots 66$ 增加 $0.00\cdots 01$, 而 $0.5$ 减少 $0.00\cdots 01$. (这里小数点后是 $n$ 位), 仍有等式
\[
0.833\cdots 33=1.66\cdots 67\times 0.499\cdots 9
\]
事实上, 我们可以证明:
\[
8\overbrace{33\cdots3}^{2n}=1\overbrace{66\cdots 67}^{n}\times 4\overbrace{99\cdots 9}^{n}
\]
[Hint] 使用归纳法即可证明.
Posted by haifeng on 2019-07-28 23:12:54 last update 2021-10-30 22:31:44 | Answers (1) | 收藏
$4!+1==25==5^2$
$5!+1==121==11^2$
$7!+1==5041==71^2$
对于 $n!+1=m^2$, 除了上面的 $n=4,5,7$ 之外, 还有解吗?
$11!+1==39916801$ is a prime
$27!+1==10888869450418352160768000001$ 很有可能是素数.
$29\mid 28!+1$
$31\mid 30!+1$
令
\[
B=\{n\in\mathbb{N}\mid n | (n-1)!+1\}
\]
则 $B$ 中的元素是哪些?
References:
Richard K. Guy, Unsolved Problems in Number Theory, D25 Equations involving factorial $n$.
Posted by haifeng on 2019-07-10 11:32:12 last update 2019-07-10 11:32:47 | Answers (0) | 收藏
求方程 $x^{341-1}\equiv 1\pmod{341}$ 的解, 这里 $x$ 为正整数.
我们这里使用 Calculator 进行计算
>> solve(x^340mod341==1,x,1,340)
in> solve(x^340@341~1,x,1,340)
ans>> x=1
ans>> x=2
ans>> x=4
ans>> x=8
ans>> x=15
ans>> x=16
ans>> x=23
ans>> x=27
ans>> x=29
ans>> x=30
ans>> x=32
ans>> x=35
ans>> x=39
ans>> x=46
ans>> x=47
ans>> x=54
ans>> x=58
ans>> x=60
ans>> x=61
ans>> x=63
ans>> x=64
ans>> x=70
ans>> x=78
ans>> x=85
ans>> x=89
ans>> x=91
ans>> x=92
ans>> x=94
ans>> x=95
ans>> x=97
ans>> x=101
ans>> x=108
ans>> x=109
ans>> x=116
ans>> x=120
ans>> x=122
ans>> x=123
ans>> x=125
ans>> x=126
ans>> x=128
ans>> x=139
ans>> x=140
ans>> x=147
ans>> x=151
ans>> x=153
ans>> x=156
ans>> x=157
ans>> x=159
ans>> x=163
ans>> x=170
ans>> x=171
ans>> x=178
ans>> x=182
ans>> x=184
ans>> x=185
ans>> x=188
ans>> x=190
ans>> x=194
ans>> x=201
ans>> x=202
ans>> x=213
ans>> x=215
ans>> x=216
ans>> x=218
ans>> x=219
ans>> x=221
ans>> x=225
ans>> x=232
ans>> x=233
ans>> x=240
ans>> x=244
ans>> x=246
ans>> x=247
ans>> x=249
ans>> x=250
ans>> x=252
ans>> x=256
ans>> x=263
ans>> x=271
ans>> x=277
ans>> x=278
ans>> x=280
ans>> x=281
ans>> x=283
ans>> x=287
ans>> x=294
ans>> x=295
ans>> x=302
ans>> x=306
ans>> x=309
ans>> x=311
ans>> x=312
ans>> x=314
ans>> x=318
ans>> x=325
ans>> x=326
ans>> x=333
ans>> x=337
ans>> x=339
------------------------
可以进行验算, 比如
>> 339^340mod 341
in> 339^340@341
out> 1
------------------------
也可以使用 expmo() 函数
>> expmo(339,340,341)
in> expmo(339,340,341)
calculate: 339^340(mod 341)
out> 1
Posted by haifeng on 2019-06-26 12:44:35 last update 2019-07-06 17:52:05 | Answers (0) | 收藏
229
19
109
1009
10009
1000000009
1000000000000000009
10000000000000000000009
>> factorise(1000000000001)
in> factorise(1000000000001)
73*137*99990001
>> factorise(1000000000000000001)
in> factorise(1000000000000000001)
101*9901*999999000001
>> factorise(10000000000000000001)
in> factorise(10000000000000000001)
11*909090909090909091
>> factorise(100000000000000000001)
in> factorise(100000000000000000001)
73*137*1676321*5964848081
>> factorise(1000000000000000000001)
in> factorise(1000000000000000000001)
7*7*11*13*127*2689*459691*909091
10000000000000000000001 == 89*101*1056689261*1052788969
1000000000000000000000001 == 17*5882353*9999999900000001
>> factorise(10000000000000000000000001)
in> factorise(10000000000000000000000001)
11*251*5051*9091*78875943472201
1000000000000000000000000001 == 7*11*13*19*52579*70541929*14175966169
>> factorise(10000000000000000000000000000001)
in> factorise(10000000000000000000000000000001)
11*909090909090909090909090909091
>> factorise(1000000000000000000000009)
in> factorise(1000000000000000000000009)
53*193*5189*82633*189169*1205257
100000000000000000000000000000000001 == 11*9091*4147571*909091*265212793249617641
1000000000000000000000000000000000001 == 73*137*3169*98641*99990001*3199044596370769
10000000000000000000000000000000000001 == 11*7253*422650073734453*296557347313446299
13
1367
13367
13333333367
13333333333333367
133333333333333333367
13333333333333333333333367
133333333333333333333333333333333333367
in> factorise(1333333333333333367)
7*190476190476190481
Posted by haifeng on 2019-06-12 23:29:05 last update 2019-07-10 11:34:36 | Answers (0) | 收藏
一个数 $n$, 如果对所有的基 $a$ (满足 $(a,n)=1$), 都有
\[
a^{n-1}\equiv 1\pmod n
\]
则称 $n$ 为 Carmichael 数.
性质: Carmichael 数一定是伪素数, 伪素数不一定是 Carmichael 数.
比如 341 是伪素数, 但 341 不是 Carmichael 数. 事实上方程 $x^{341-1}\equiv 1\pmod{341}$ 有很多解. (参见问题2306)
相关条目: 伪素数
Thm. (Carmichael数的判别法) 设 $n$ 为合数, 则 $n$ 是 Carmichael 数当且仅当 $n$ 是奇数且对整除 $n$ 的每个素数 $p$, 满足
Posted by haifeng on 2019-06-12 23:16:46 last update 2019-06-19 14:01:19 | Answers (4) | 收藏
所谓的伪素数是指满足费马小定理的合数.
Fermat 小定理: 设 $p$ 是一个素数, 且 $0 < a < p$, 则有 $a^{p-1}\equiv 1\pmod p$.
举出10000以内的所有伪素数. 比如1000以内的伪素数只有三个: 341, 561, 645.
10000 以内的pseudo prime 有:
341
561
645
1105
1387
1729
1905
2047
2465
2701
2821
3277
4033
4371
4681
5461
6601
7957
8321
8481
8911
------------
Total: 21
[10000, 20000] 以内的伪素数
10261, 10585, 11305,12801,13741,13747,13981,14491,15709,15841,16705,18705,18721,19951