mathe
发表于 2018-12-14 13:38:46
看14#的过程,
n=333,解$333u^2-v^2=-1$,可以有u=4,v=73
$Y=2n u^2+1=10657, X=2uv=584$
$A=nY-X=3548197,B=n^2X-Y=64748519$
$a=(n+A)/2=1774265$
$b=(B+1)/(2n)=97220$
wayne
发表于 2018-12-14 15:45:27
其实 根据Brahmagupta恒等式https://en.wikipedia.org/wiki/Brahmagupta%27s_identity
\[(x_{1}^{2}-Ny_{1}^{2})(x_{2}^{2}-Ny_{2}^{2})=(x_{1}x_{2}+Ny_{1}y_{2})^{2}-N(x_{1}y_{2}+x_{2}y_{1})^{2}\]
可以由两个三元组$(x_1,y_1,k_1),(x_2,y_2,k_2)$,生成 第三个三元组$(x_{1}x_{2}+Ny_{1}y_{2}, x_{1}y_{2}+x_{2}y_{1},k_{1}k_{2})$。
不知道这个是不是就足够了。等有空了再回头 补上过程。
比如,根据$333^3 - 1 = 2^2 * 7 * 83 * 15889$分解因子得到这些情况:
由$(73,4,1), (1,333,1 - 333^3)$得到$(443629, 24313,1 - 333^3)$
由$(19,1,28), (3961,226,\frac{1 - 333^3}{28})$得到$(150517, 8255,1 - 333^3)$
由$(19,1,28), (-3961,226,\frac{1 - 333^3}{28})$得到$(-1, 333,1 - 333^3)$
由$(146, 8,4), (4532, 299,\frac{1 - 333^3}{4})$得到$(1458208, 79910,1 - 333^3)$
由$(146, 8,4), (-4532, 299,\frac{1 - 333^3}{4})$得到$(134864, -7398,1 - 333^3)$
由$(88, 5, -7*83), (859, 45,\frac{1 - 333^3}{-7*83})$得到$(150517, 8255,1 - 333^3)$
由$(88, 5, -7*83), (859, -45,\frac{1 - 333^3}{-7*83})$得到$(667, 335,1 - 333^3)$
================【不再一一枚举了,因为我关心的最小的非平凡的667, 335已经找到了】================
附注:$X^2 - n Y^2 = 1 - n^3,n=333, 0<X<10^10,0<Y$的解,可以对照上面的解:
{1,333}
{667,335}
{7919,547}
{9064,598}
{134864,7398}
{150517,8255}
{397529,21787}
{443483,24305}
{443629,24313}
{494911,27123}
{1306691,71607}
{1458208,79910}
{19699208,1079510}
{21983401,1204683}
{58039901,3180567}
{64748519,3548197}
{64769833,3549365}
{72256339,3959623}
{190768967,10454075}
{212889304,11666262}
{2875949504,157601062}
{3209426029,175875463}
{8473428017,464340995}
{9452840291,518012457}
{9455951989,518182977}
dlpg070
发表于 2018-12-15 10:36:57
回复mathe 31#
我找到了我和mathe计算不同的原因了
我是按11#公式计算
A=n*Y+X, (1) 11# n*u^2-v^2=1有解时
B=n^2*X+Y (2)
mathe按14#公式计算
A=n*Y-X, (1) 14# n*u^2-v^2=-1 总有解
B=n^2*X+Y (2)
11#公式不能保证永远得到整数解(a,b)
14#公式保证n不是平方数时永远得到整数解(a,b)
没有疑问了
虽然不一定找到基本解,但一定能找到多组解
此题完美解决了。
对于 n=4 ,仍没有找到第2组解,我将继续找
dlpg070
发表于 2018-12-15 13:14:32
回复mathe :对于给定的n,如果n是完全平方数,应该很好解
mathe已经给出一组解,没疑问
但是 对于这类n 第二组解很难见到,需要很大的b(n=4,9,25,49,---)
我的疑问是 n=4 是否有第二组解,
有肯定的答案吗?
wayne
发表于 2018-12-15 13:45:12
dlpg070 发表于 2018-12-15 13:14
回复mathe :对于给定的n,如果n是完全平方数,应该很好解
mathe已经给出一组解,没疑问
但是 对于这类n 第 ...
$n=4,n^3-1 = 63 = 7*9 = 3*21 = 1*63$ 分别代入进去,得到正整数只有$a=10,b=4$ 一组解。
dlpg070
发表于 2018-12-15 16:15:24
wayne 发表于 2018-12-14 15:45
其实 根据Brahmagupta恒等式https://en.wikipedia.org/wiki/Brahmagupta%27s_identity
\[(x_{1}^{2}-Ny_{1 ...
回复wayne
谢回复
相信你的结论正确
为了更好理解你的算法
请费心分析
n=9
n=16
n=25
n=36
n=49
是否只有唯一解
我估计大多数只有唯一解
mathe
发表于 2018-12-15 17:14:02
n=4^2可以有两组解(264,64), (37,7)
n=5^2有a=143,b=26和a=36,b=4
n=9^2有a=1517,b=164和a=101,b=5
n=10^2有a=25050,b=2500和a=1241,b=119和a=114,b=4
n=11^2有a=3416,b=305;a=257,b=17;a=186,b=10;a=150,b=6
n=16^2, a=262272,b=16384;a=4162,b=252
n=19^2, a=31132,b=1629; a=3131,b=155
n=23^2, a=67310,b=2915;a=1090,b=34;a=615,b=10
dlpg070
发表于 2018-12-15 17:48:55
本帖最后由 dlpg070 于 2018-12-15 18:00 编辑
回复wayne:
你的数据,我能验算的全部正确
请补充 n=3^2=9
n=6^2=36
n=7^2=49
n=8^2=64
mathe
发表于 2018-12-15 18:28:01
唯一解所以没有列出
wayne
发表于 2018-12-15 20:33:04
我来把37# mathe的数据扩充一下
Table[{Sqrt^HoldForm,
Select) + n)/
2, (((n^3 - 1)/k - k)/2 + 1)/(2 n)}, {k,
TakeWhile[
Divisors, # < Sqrt &]}], #\ Integers &]}, {n,
Range^2}] // Column
{2^2,{{10,4}}}
{3^2,{{20,5}}}
{4^2,{{264,64},{37,7}}}
{5^2,{{143,26},{36,4}}}
{6^2,{{1962,324}}}
{7^2,{{550,75}}}
{8^2,{{8224,1024}}}
{9^2,{{1517,164},{101,5}}}
{10^2,{{25050,2500},{1241,119},{114,4}}}
{11^2,{{3416,305},{257,17},{186,10},{150,6}}}
{12^2,{{62280,5184}}}
{13^2,{{6715,510}}}
{14^2,{{134554,9604}}}
{15^2,{{11978,791}}}
{16^2,{{262272,16384},{4162,252}}}
{17^2,{{19865,1160}}}
{18^2,{{472554,26244}}}
{19^2,{{31132,1629},{3131,155}}}
{20^2,{{800200,40000}}}
{21^2,{{46631,2210}}}
{22^2,{{1288650,58564}}}
{23^2,{{67310,2915},{1090,34},{615,10}}}
{24^2,{{1990944,82944}}}
{25^2,{{94213,3756},{19690,775}}}
{26^2,{{2970682,114244},{28628,1088},{2831,95},{2138,68}}}
{27^2,{{128480,4745}}}
{28^2,{{4302984,153664}}}
{29^2,{{171347,5894},{2267,62}}}
{30^2,{{6075450,202500},{2627,71}}}
{31^2,{{224146,7215},{21411,675},{4047,114}}}
{32^2,{{8389120,262144}}}
{33^2,{{288305,8720}}}
{34^2,{{11359434,334084}}}
{35^2,{{365348,10421}}}
{36^2,{{15117192,419904},{70311,1935}}}
{37^2,{{456895,12330},{93890,2519},{3185,65}}}
{38^2,{{19809514,521284}}}
{39^2,{{564662,14459}}}
{40^2,{{25600800,640000}}}
{41^2,{{690461,16820}}}
{42^2,{{32673690,777924}}}
{43^2,{{836200,19425},{3069,45}}}
{44^2,{{41230024,937024}}}
{45^2,{{1003883,22286},{16795,350},{3854,59}}}
{46^2,{{51491802,1119364},{44081,935}}}
{47^2,{{1195610,25415},{111795,2355}}}
{48^2,{{63702144,1327104},{133589,2759},{6979,119}}}
{49^2,{{1413577,28824},{47668,948},{8793,153},{5394,82},{2951,26}}}
{50^2,{{78126250,1562500},{260803,5191}}}
{51^2,{{1660076,32525}}}
{52^2,{{95052360,1827904}}}
{53^2,{{1937495,36530}}}
{54^2,{{114792714,2125764}}}
{55^2,{{2248318,40851},{135941,2444}}}
{56^2,{{137684512,2458624},{19947,327},{10609,159}}}
{57^2,{{2595125,45500}}}
{58^2,{{164090874,2829124}}}
{59^2,{{2980592,50489}}}
{60^2,{{194401800,3240000}}}
{61^2,{{3407491,55830}}}
{62^2,{{229035130,3694084}}}
{63^2,{{3878690,61535}}}
{64^2,{{268437504,4194304},{525316,8176},{163277,2519},{8282,92},{5687,47}}}
{65^2,{{4397153,67616},{101260,1525}}}
{66^2,{{313085322,4743684}}}
{67^2,{{4965940,74085}}}
{68^2,{{363485704,5345344},{1333754,19580},{7240,64},{4839,15}}}
{69^2,{{5588207,80954}}}
{70^2,{{420177450,6002500}}}
{71^2,{{6267206,88235}}}
{72^2,{{483732000,6718464}}}
{73^2,{{7006285,95940}}}
{74^2,{{554754394,7496644}}}
{75^2,{{7808888,104081}}}
{76^2,{{633884232,8340544}}}
{77^2,{{8678555,112670}}}
{78^2,{{721796634,9253764}}}
{79^2,{{9618922,121719},{78630,955}}}
{80^2,{{819203200,10240000}}}
{81^2,{{10633721,131240},{1197387,14742}}}
{82^2,{{926852970,11303044},{1414094,17204}}}
{83^2,{{11726780,141245}}}
{84^2,{{1045533384,12446784}}}
{85^2,{{12902023,151746}}}
{86^2,{{1176071242,13675204}}}
{87^2,{{14163470,162755},{626194,7154}}}
{88^2,{{1319333664,14992384}}}
{89^2,{{15515237,174284},{38100,381}}}
{90^2,{{1476229050,16402500}}}
{91^2,{{16961536,186345}}}
{92^2,{{1647708040,17909824}}}
{93^2,{{18506675,198950},{31639,290}}}
{94^2,{{1834764474,19518724},{654819,6919},{64740,640}}}
{95^2,{{20155058,212111}}}
{96^2,{{2038436352,21233664}}}
{97^2,{{21911185,225840},{767624,7865}}}
{98^2,{{2259806794,23059204}}}
{99^2,{{23779652,240149}}}
{100^2,{{2500005000,25000000},{2502505,24975}}}