找回密码
 欢迎注册
查看: 44247|回复: 23

[分享] 单位分数难题续

[复制链接]
发表于 2010-1-18 18:21:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?欢迎注册

×
若$x_1,x_2,....,x_n$均为正整数,且$x_1>=x_2>=x_3>=x_4....>=x_n$ 求 $1/x_1+1/x_2+....+1/x_n=1\quad(5<=n<=8) $的所有解? 前面一个贴子中"关于单位分数的一些难题"中,http://bbs.emath.ac.cn/thread-2060-1-1.html mathe出色而快速的完成了计算过程 现在,我们进一步提出上面的问题,希望能更完美的解决....
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-18 23:05:37 | 显示全部楼层
n=5太简单,写一个没有任何技术含量的基于浮点运算的穷举程序就解决了。 代码如下:
  1. #include<cstdio>
  2. #include<math.h>
  3. int a,b,c,d,g;
  4. double e[1000],f;
  5. int main()
  6. {
  7. for(a=1;a<1000;a++)e[a]=1.0/a;
  8. for(a=2;a<6;a++)
  9. for(b=a;b<9;b++)
  10. for(c=b;c<19;c++)
  11. for(d=c;d<85;d++)
  12. {
  13. f=1-e[a]-e[b]-e[c]-e[d];
  14. if(f>1e-9)
  15. {
  16. f=1/f;
  17. g=int(f+0.5);
  18. if(g>=d&&fabs(f-g)<1e-9)
  19. {
  20. printf("1/%d + 1/%d + 1/%d + 1/%d + 1/%d = 1\n",a,b,c,d,int(f+0.5));
  21. }
  22. }
  23. }
  24. return 0;
  25. }
复制代码
输出结果:
  1. 1/2 + 1/3 + 1/7 + 1/43 + 1/1806 = 1
  2. 1/2 + 1/3 + 1/7 + 1/44 + 1/924 = 1
  3. 1/2 + 1/3 + 1/7 + 1/45 + 1/630 = 1
  4. 1/2 + 1/3 + 1/7 + 1/46 + 1/483 = 1
  5. 1/2 + 1/3 + 1/7 + 1/48 + 1/336 = 1
  6. 1/2 + 1/3 + 1/7 + 1/49 + 1/294 = 1
  7. 1/2 + 1/3 + 1/7 + 1/51 + 1/238 = 1
  8. 1/2 + 1/3 + 1/7 + 1/54 + 1/189 = 1
  9. 1/2 + 1/3 + 1/7 + 1/56 + 1/168 = 1
  10. 1/2 + 1/3 + 1/7 + 1/60 + 1/140 = 1
  11. 1/2 + 1/3 + 1/7 + 1/63 + 1/126 = 1
  12. 1/2 + 1/3 + 1/7 + 1/70 + 1/105 = 1
  13. 1/2 + 1/3 + 1/7 + 1/78 + 1/91 = 1
  14. 1/2 + 1/3 + 1/7 + 1/84 + 1/84 = 1
  15. 1/2 + 1/3 + 1/8 + 1/25 + 1/600 = 1
  16. 1/2 + 1/3 + 1/8 + 1/26 + 1/312 = 1
  17. 1/2 + 1/3 + 1/8 + 1/27 + 1/216 = 1
  18. 1/2 + 1/3 + 1/8 + 1/28 + 1/168 = 1
  19. 1/2 + 1/3 + 1/8 + 1/30 + 1/120 = 1
  20. 1/2 + 1/3 + 1/8 + 1/32 + 1/96 = 1
  21. 1/2 + 1/3 + 1/8 + 1/33 + 1/88 = 1
  22. 1/2 + 1/3 + 1/8 + 1/36 + 1/72 = 1
  23. 1/2 + 1/3 + 1/8 + 1/40 + 1/60 = 1
  24. 1/2 + 1/3 + 1/8 + 1/42 + 1/56 = 1
  25. 1/2 + 1/3 + 1/8 + 1/48 + 1/48 = 1
  26. 1/2 + 1/3 + 1/9 + 1/19 + 1/342 = 1
  27. 1/2 + 1/3 + 1/9 + 1/20 + 1/180 = 1
  28. 1/2 + 1/3 + 1/9 + 1/21 + 1/126 = 1
  29. 1/2 + 1/3 + 1/9 + 1/22 + 1/99 = 1
  30. 1/2 + 1/3 + 1/9 + 1/24 + 1/72 = 1
  31. 1/2 + 1/3 + 1/9 + 1/27 + 1/54 = 1
  32. 1/2 + 1/3 + 1/9 + 1/30 + 1/45 = 1
  33. 1/2 + 1/3 + 1/9 + 1/36 + 1/36 = 1
  34. 1/2 + 1/3 + 1/10 + 1/16 + 1/240 = 1
  35. 1/2 + 1/3 + 1/10 + 1/18 + 1/90 = 1
  36. 1/2 + 1/3 + 1/10 + 1/20 + 1/60 = 1
  37. 1/2 + 1/3 + 1/10 + 1/24 + 1/40 = 1
  38. 1/2 + 1/3 + 1/10 + 1/30 + 1/30 = 1
  39. 1/2 + 1/3 + 1/11 + 1/14 + 1/231 = 1
  40. 1/2 + 1/3 + 1/11 + 1/15 + 1/110 = 1
  41. 1/2 + 1/3 + 1/11 + 1/22 + 1/33 = 1
  42. 1/2 + 1/3 + 1/12 + 1/13 + 1/156 = 1
  43. 1/2 + 1/3 + 1/12 + 1/14 + 1/84 = 1
  44. 1/2 + 1/3 + 1/12 + 1/15 + 1/60 = 1
  45. 1/2 + 1/3 + 1/12 + 1/16 + 1/48 = 1
  46. 1/2 + 1/3 + 1/12 + 1/18 + 1/36 = 1
  47. 1/2 + 1/3 + 1/12 + 1/20 + 1/30 = 1
  48. 1/2 + 1/3 + 1/12 + 1/21 + 1/28 = 1
  49. 1/2 + 1/3 + 1/12 + 1/24 + 1/24 = 1
  50. 1/2 + 1/3 + 1/13 + 1/13 + 1/78 = 1
  51. 1/2 + 1/3 + 1/14 + 1/14 + 1/42 = 1
  52. 1/2 + 1/3 + 1/14 + 1/15 + 1/35 = 1
  53. 1/2 + 1/3 + 1/14 + 1/21 + 1/21 = 1
  54. 1/2 + 1/3 + 1/15 + 1/15 + 1/30 = 1
  55. 1/2 + 1/3 + 1/15 + 1/20 + 1/20 = 1
  56. 1/2 + 1/3 + 1/16 + 1/16 + 1/24 = 1
  57. 1/2 + 1/3 + 1/18 + 1/18 + 1/18 = 1
  58. 1/2 + 1/4 + 1/5 + 1/21 + 1/420 = 1
  59. 1/2 + 1/4 + 1/5 + 1/22 + 1/220 = 1
  60. 1/2 + 1/4 + 1/5 + 1/24 + 1/120 = 1
  61. 1/2 + 1/4 + 1/5 + 1/25 + 1/100 = 1
  62. 1/2 + 1/4 + 1/5 + 1/28 + 1/70 = 1
  63. 1/2 + 1/4 + 1/5 + 1/30 + 1/60 = 1
  64. 1/2 + 1/4 + 1/5 + 1/36 + 1/45 = 1
  65. 1/2 + 1/4 + 1/5 + 1/40 + 1/40 = 1
  66. 1/2 + 1/4 + 1/6 + 1/13 + 1/156 = 1
  67. 1/2 + 1/4 + 1/6 + 1/14 + 1/84 = 1
  68. 1/2 + 1/4 + 1/6 + 1/15 + 1/60 = 1
  69. 1/2 + 1/4 + 1/6 + 1/16 + 1/48 = 1
  70. 1/2 + 1/4 + 1/6 + 1/18 + 1/36 = 1
  71. 1/2 + 1/4 + 1/6 + 1/20 + 1/30 = 1
  72. 1/2 + 1/4 + 1/6 + 1/21 + 1/28 = 1
  73. 1/2 + 1/4 + 1/6 + 1/24 + 1/24 = 1
  74. 1/2 + 1/4 + 1/7 + 1/10 + 1/140 = 1
  75. 1/2 + 1/4 + 1/7 + 1/12 + 1/42 = 1
  76. 1/2 + 1/4 + 1/7 + 1/14 + 1/28 = 1
  77. 1/2 + 1/4 + 1/8 + 1/9 + 1/72 = 1
  78. 1/2 + 1/4 + 1/8 + 1/10 + 1/40 = 1
  79. 1/2 + 1/4 + 1/8 + 1/12 + 1/24 = 1
  80. 1/2 + 1/4 + 1/8 + 1/16 + 1/16 = 1
  81. 1/2 + 1/4 + 1/9 + 1/9 + 1/36 = 1
  82. 1/2 + 1/4 + 1/9 + 1/12 + 1/18 = 1
  83. 1/2 + 1/4 + 1/10 + 1/10 + 1/20 = 1
  84. 1/2 + 1/4 + 1/10 + 1/12 + 1/15 = 1
  85. 1/2 + 1/4 + 1/12 + 1/12 + 1/12 = 1
  86. 1/2 + 1/5 + 1/5 + 1/11 + 1/110 = 1
  87. 1/2 + 1/5 + 1/5 + 1/12 + 1/60 = 1
  88. 1/2 + 1/5 + 1/5 + 1/14 + 1/35 = 1
  89. 1/2 + 1/5 + 1/5 + 1/15 + 1/30 = 1
  90. 1/2 + 1/5 + 1/5 + 1/20 + 1/20 = 1
  91. 1/2 + 1/5 + 1/6 + 1/8 + 1/120 = 1
  92. 1/2 + 1/5 + 1/6 + 1/9 + 1/45 = 1
  93. 1/2 + 1/5 + 1/6 + 1/10 + 1/30 = 1
  94. 1/2 + 1/5 + 1/6 + 1/12 + 1/20 = 1
  95. 1/2 + 1/5 + 1/6 + 1/15 + 1/15 = 1
  96. 1/2 + 1/5 + 1/7 + 1/7 + 1/70 = 1
  97. 1/2 + 1/5 + 1/8 + 1/8 + 1/20 = 1
  98. 1/2 + 1/5 + 1/10 + 1/10 + 1/10 = 1
  99. 1/2 + 1/6 + 1/6 + 1/7 + 1/42 = 1
  100. 1/2 + 1/6 + 1/6 + 1/8 + 1/24 = 1
  101. 1/2 + 1/6 + 1/6 + 1/9 + 1/18 = 1
  102. 1/2 + 1/6 + 1/6 + 1/10 + 1/15 = 1
  103. 1/2 + 1/6 + 1/6 + 1/12 + 1/12 = 1
  104. 1/2 + 1/6 + 1/7 + 1/7 + 1/21 = 1
  105. 1/2 + 1/6 + 1/8 + 1/8 + 1/12 = 1
  106. 1/2 + 1/6 + 1/9 + 1/9 + 1/9 = 1
  107. 1/2 + 1/7 + 1/7 + 1/7 + 1/14 = 1
  108. 1/2 + 1/8 + 1/8 + 1/8 + 1/8 = 1
  109. 1/3 + 1/3 + 1/4 + 1/13 + 1/156 = 1
  110. 1/3 + 1/3 + 1/4 + 1/14 + 1/84 = 1
  111. 1/3 + 1/3 + 1/4 + 1/15 + 1/60 = 1
  112. 1/3 + 1/3 + 1/4 + 1/16 + 1/48 = 1
  113. 1/3 + 1/3 + 1/4 + 1/18 + 1/36 = 1
  114. 1/3 + 1/3 + 1/4 + 1/20 + 1/30 = 1
  115. 1/3 + 1/3 + 1/4 + 1/21 + 1/28 = 1
  116. 1/3 + 1/3 + 1/4 + 1/24 + 1/24 = 1
  117. 1/3 + 1/3 + 1/5 + 1/8 + 1/120 = 1
  118. 1/3 + 1/3 + 1/5 + 1/9 + 1/45 = 1
  119. 1/3 + 1/3 + 1/5 + 1/10 + 1/30 = 1
  120. 1/3 + 1/3 + 1/5 + 1/12 + 1/20 = 1
  121. 1/3 + 1/3 + 1/5 + 1/15 + 1/15 = 1
  122. 1/3 + 1/3 + 1/6 + 1/7 + 1/42 = 1
  123. 1/3 + 1/3 + 1/6 + 1/8 + 1/24 = 1
  124. 1/3 + 1/3 + 1/6 + 1/9 + 1/18 = 1
  125. 1/3 + 1/3 + 1/6 + 1/10 + 1/15 = 1
  126. 1/3 + 1/3 + 1/6 + 1/12 + 1/12 = 1
  127. 1/3 + 1/3 + 1/7 + 1/7 + 1/21 = 1
  128. 1/3 + 1/3 + 1/8 + 1/8 + 1/12 = 1
  129. 1/3 + 1/3 + 1/9 + 1/9 + 1/9 = 1
  130. 1/3 + 1/4 + 1/4 + 1/7 + 1/42 = 1
  131. 1/3 + 1/4 + 1/4 + 1/8 + 1/24 = 1
  132. 1/3 + 1/4 + 1/4 + 1/9 + 1/18 = 1
  133. 1/3 + 1/4 + 1/4 + 1/10 + 1/15 = 1
  134. 1/3 + 1/4 + 1/4 + 1/12 + 1/12 = 1
  135. 1/3 + 1/4 + 1/5 + 1/5 + 1/60 = 1
  136. 1/3 + 1/4 + 1/5 + 1/6 + 1/20 = 1
  137. 1/3 + 1/4 + 1/6 + 1/6 + 1/12 = 1
  138. 1/3 + 1/4 + 1/6 + 1/8 + 1/8 = 1
  139. 1/3 + 1/5 + 1/5 + 1/5 + 1/15 = 1
  140. 1/3 + 1/5 + 1/5 + 1/6 + 1/10 = 1
  141. 1/3 + 1/6 + 1/6 + 1/6 + 1/6 = 1
  142. 1/4 + 1/4 + 1/4 + 1/5 + 1/20 = 1
  143. 1/4 + 1/4 + 1/4 + 1/6 + 1/12 = 1
  144. 1/4 + 1/4 + 1/4 + 1/8 + 1/8 = 1
  145. 1/4 + 1/4 + 1/5 + 1/5 + 1/10 = 1
  146. 1/4 + 1/4 + 1/6 + 1/6 + 1/6 = 1
  147. 1/5 + 1/5 + 1/5 + 1/5 + 1/5 = 1
复制代码
枚举量:21549
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2010-1-19 08:21:53 | 显示全部楼层
呵呵,对于n=5,利用Wayne提供的程序也就几分钟时间 111.jpg
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 08:43:10 | 显示全部楼层
对于n=8,应该可以穷举6个数,后面两个数通过解方程方法来得出.只是总数会有点多.
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 08:53:17 | 显示全部楼层
要搜索的话,先找一下约束关系吧。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 09:07:34 | 显示全部楼层
稍微修改一下前面的gp程序就可以了.不过运算结果标明处理N=7还行,但是N=8估计解太多了,全部求解可能性不大,看来应该改成以计数作为目标. 其中N=6的解总数为2060 N=7还在运行中,有点慢
  1. N()=
  2. {
  3. 7
  4. }
  5. K()=
  6. {
  7. N()-2
  8. }
  9. BEGIN()=
  10. {
  11. 0
  12. }
  13. END()=
  14. {
  15. -1
  16. }
  17. OUTFILENAME()=
  18. {
  19. "N7.txt"
  20. }
  21. output()=
  22. {
  23. local(V,MM,RR,uu,f,v,v2,a,b,d);
  24. MM=M[K()];
  25. RR=R[K()];
  26. V=MM;
  27. c=c+1;
  28. if(c>=BEGIN()&&(END()<0||c<=END()),
  29. f=divisors(V);
  30. for(u=1,length(f),
  31. for(u2=u+1,length(f),
  32. v=f[u];v2=f[u2];
  33. if((v+v2)%RR!=0, next());
  34. if(gcd(v,v2)>1,next());
  35. d=(v+v2)/RR*(V/(v*v2));
  36. a=d*v;b=d*v2;
  37. if(a>n[K()],
  38. n[K()+1]=a;
  39. n[K()+2]=b;
  40. write(OUTFILENAME(),n)
  41. )
  42. )
  43. )
  44. );
  45. if(c%100==0, print("process " c " lines"))
  46. }
  47. search(level)=
  48. {
  49. local(ll,uu,dd);
  50. if(level>=K(),
  51. output(),
  52. ll=floor(M[level]/R[level])+1;
  53. uu=floor((N()-level)*M[level]/R[level]);
  54. if(ll<=n[level],ll=n[level]+1);
  55. for(i=ll,uu,
  56. n[level+1]=i;
  57. dd=gcd(M[level],i);
  58. M[level+1]=M[level]*i/dd;
  59. R[level+1]=(R[level]*i-M[level])/dd;
  60. A[i%4+1]=A[i%4+1]+1;
  61. search(level+1);
  62. A[i%4+1]=A[i%4+1]-1
  63. )
  64. )
  65. }
  66. search0()=
  67. {
  68. n=vector(N());
  69. M=vector(N());
  70. R=vector(N());
  71. A=vector(4);
  72. c=0;
  73. for(i=2,7,
  74. n[1]=i;
  75. R[1]=i-1;
  76. M[1]=i;
  77. A[i%4+1]=A[i%4+1]+1;
  78. search(1);
  79. A[i%4+1]=A[i%4+1]-1;
  80. )
  81. }
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 09:11:41 | 显示全部楼层
发现N=5时同KeyTo9_Fans结果不一致,才发现这里允许重复的数据,那么代码还得修改一下:
  1. N()=
  2. {
  3. 5
  4. }
  5. K()=
  6. {
  7. N()-2
  8. }
  9. BEGIN()=
  10. {
  11. 0
  12. }
  13. END()=
  14. {
  15. -1
  16. }
  17. OUTFILENAME()=
  18. {
  19. "/home/zdu/N5.txt"
  20. }
  21. output()=
  22. {
  23. local(V,MM,RR,uu,f,v,v2,a,b,d);
  24. MM=M[K()];
  25. RR=R[K()];
  26. V=MM;
  27. c=c+1;
  28. if(c>=BEGIN()&&(END()<0||c<=END()),
  29. f=divisors(V);
  30. for(u=1,length(f),
  31. for(u2=u+1,length(f),
  32. v=f[u];v2=f[u2];
  33. if((v+v2)%RR!=0, next());
  34. if(gcd(v,v2)>1,next());
  35. d=(v+v2)/RR*(V/(v*v2));
  36. a=d*v;b=d*v2;
  37. if(a>n[K()],
  38. n[K()+1]=a;
  39. n[K()+2]=b;
  40. write(OUTFILENAME(),n)
  41. )
  42. )
  43. )
  44. );
  45. if(c%100==0, print("process " c " lines"))
  46. }
  47. search(level)=
  48. {
  49. local(ll,uu,dd);
  50. if(level>=K(),
  51. output(),
  52. ll=floor(M[level]/R[level])+1;
  53. uu=floor((N()-level)*M[level]/R[level]);
  54. if(ll<=n[level],ll=n[level]);
  55. for(i=ll,uu,
  56. n[level+1]=i;
  57. dd=gcd(M[level],i);
  58. M[level+1]=M[level]*i/dd;
  59. R[level+1]=(R[level]*i-M[level])/dd;
  60. A[i%4+1]=A[i%4+1]+1;
  61. search(level+1);
  62. A[i%4+1]=A[i%4+1]-1
  63. )
  64. )
  65. }
  66. search0()=
  67. {
  68. n=vector(N());
  69. M=vector(N());
  70. R=vector(N());
  71. A=vector(4);
  72. c=0;
  73. for(i=2,8,
  74. n[1]=i;
  75. R[1]=i-1;
  76. M[1]=i;
  77. A[i%4+1]=A[i%4+1]+1;
  78. search(1);
  79. A[i%4+1]=A[i%4+1]-1;
  80. )
  81. }
复制代码
结果N=5有167个
  1. [2, 3, 7, 63, 126]
  2. [2, 3, 7, 56, 168]
  3. [2, 3, 7, 49, 294]
  4. [2, 3, 7, 48, 336]
  5. [2, 3, 7, 45, 630]
  6. [2, 3, 7, 44, 924]
  7. [2, 3, 7, 43, 1806]
  8. [2, 3, 7, 70, 105]
  9. [2, 3, 7, 54, 189]
  10. [2, 3, 7, 46, 483]
  11. [2, 3, 7, 60, 140]
  12. [2, 3, 7, 51, 238]
  13. [2, 3, 7, 78, 91]
  14. [2, 3, 8, 36, 72]
  15. [2, 3, 8, 32, 96]
  16. [2, 3, 8, 30, 120]
  17. [2, 3, 8, 28, 168]
  18. [2, 3, 8, 27, 216]
  19. [2, 3, 8, 26, 312]
  20. [2, 3, 8, 25, 600]
  21. [2, 3, 8, 40, 60]
  22. [2, 3, 8, 42, 56]
  23. [2, 3, 8, 33, 88]
  24. [2, 3, 9, 27, 54]
  25. [2, 3, 9, 24, 72]
  26. [2, 3, 9, 21, 126]
  27. [2, 3, 9, 20, 180]
  28. [2, 3, 9, 19, 342]
  29. [2, 3, 9, 30, 45]
  30. [2, 3, 9, 22, 99]
  31. [2, 3, 10, 20, 60]
  32. [2, 3, 10, 18, 90]
  33. [2, 3, 10, 16, 240]
  34. [2, 3, 10, 24, 40]
  35. [2, 3, 11, 22, 33]
  36. [2, 3, 11, 14, 231]
  37. [2, 3, 11, 15, 110]
  38. [2, 3, 12, 18, 36]
  39. [2, 3, 12, 16, 48]
  40. [2, 3, 12, 15, 60]
  41. [2, 3, 12, 14, 84]
  42. [2, 3, 12, 13, 156]
  43. [2, 3, 12, 20, 30]
  44. [2, 3, 12, 21, 28]
  45. [2, 4, 5, 30, 60]
  46. [2, 4, 5, 25, 100]
  47. [2, 4, 5, 24, 120]
  48. [2, 4, 5, 22, 220]
  49. [2, 4, 5, 21, 420]
  50. [2, 4, 5, 28, 70]
  51. [2, 4, 5, 36, 45]
  52. [2, 4, 6, 18, 36]
  53. [2, 4, 6, 16, 48]
  54. [2, 4, 6, 15, 60]
  55. [2, 4, 6, 14, 84]
  56. [2, 4, 6, 13, 156]
  57. [2, 4, 6, 20, 30]
  58. [2, 4, 6, 21, 28]
  59. [2, 4, 7, 14, 28]
  60. [2, 4, 7, 10, 140]
  61. [2, 4, 7, 12, 42]
  62. [2, 4, 8, 12, 24]
  63. [2, 4, 8, 10, 40]
  64. [2, 4, 8, 9, 72]
  65. [2, 4, 9, 12, 18]
  66. [2, 4, 10, 12, 15]
  67. [2, 5, 6, 10, 30]
  68. [2, 5, 6, 8, 120]
  69. [2, 5, 6, 12, 20]
  70. [3, 4, 5, 6, 20]
  71. [2, 3, 7, 63, 126]
  72. [2, 3, 7, 56, 168]
  73. [2, 3, 7, 49, 294]
  74. [2, 3, 7, 48, 336]
  75. [2, 3, 7, 45, 630]
  76. [2, 3, 7, 44, 924]
  77. [2, 3, 7, 43, 1806]
  78. [2, 3, 7, 70, 105]
  79. [2, 3, 7, 54, 189]
  80. [2, 3, 7, 46, 483]
  81. [2, 3, 7, 60, 140]
  82. [2, 3, 7, 51, 238]
  83. [2, 3, 7, 78, 91]
  84. [2, 3, 8, 36, 72]
  85. [2, 3, 8, 32, 96]
  86. [2, 3, 8, 30, 120]
  87. [2, 3, 8, 28, 168]
  88. [2, 3, 8, 27, 216]
  89. [2, 3, 8, 26, 312]
  90. [2, 3, 8, 25, 600]
  91. [2, 3, 8, 40, 60]
  92. [2, 3, 8, 42, 56]
  93. [2, 3, 8, 33, 88]
  94. [2, 3, 9, 27, 54]
  95. [2, 3, 9, 24, 72]
  96. [2, 3, 9, 21, 126]
  97. [2, 3, 9, 20, 180]
  98. [2, 3, 9, 19, 342]
  99. [2, 3, 9, 30, 45]
  100. [2, 3, 9, 22, 99]
  101. [2, 3, 10, 20, 60]
  102. [2, 3, 10, 18, 90]
  103. [2, 3, 10, 16, 240]
  104. [2, 3, 10, 24, 40]
  105. [2, 3, 11, 22, 33]
  106. [2, 3, 11, 14, 231]
  107. [2, 3, 11, 15, 110]
  108. [2, 3, 12, 18, 36]
  109. [2, 3, 12, 16, 48]
  110. [2, 3, 12, 15, 60]
  111. [2, 3, 12, 14, 84]
  112. [2, 3, 12, 13, 156]
  113. [2, 3, 12, 20, 30]
  114. [2, 3, 12, 21, 28]
  115. [2, 4, 5, 30, 60]
  116. [2, 4, 5, 25, 100]
  117. [2, 4, 5, 24, 120]
  118. [2, 4, 5, 22, 220]
  119. [2, 4, 5, 21, 420]
  120. [2, 4, 5, 28, 70]
  121. [2, 4, 5, 36, 45]
  122. [2, 4, 6, 18, 36]
  123. [2, 4, 6, 16, 48]
  124. [2, 4, 6, 15, 60]
  125. [2, 4, 6, 14, 84]
  126. [2, 4, 6, 13, 156]
  127. [2, 4, 6, 20, 30]
  128. [2, 4, 6, 21, 28]
  129. [2, 4, 7, 14, 28]
  130. [2, 4, 7, 10, 140]
  131. [2, 4, 7, 12, 42]
  132. [2, 4, 8, 12, 24]
  133. [2, 4, 8, 10, 40]
  134. [2, 4, 8, 9, 72]
  135. [2, 4, 9, 12, 18]
  136. [2, 4, 10, 12, 15]
  137. [2, 5, 5, 15, 30]
  138. [2, 5, 5, 12, 60]
  139. [2, 5, 5, 11, 110]
  140. [2, 5, 5, 14, 35]
  141. [2, 5, 6, 10, 30]
  142. [2, 5, 6, 8, 120]
  143. [2, 5, 6, 12, 20]
  144. [2, 6, 6, 9, 18]
  145. [2, 6, 6, 8, 24]
  146. [2, 6, 6, 7, 42]
  147. [2, 6, 6, 10, 15]
  148. [3, 3, 4, 18, 36]
  149. [3, 3, 4, 16, 48]
  150. [3, 3, 4, 15, 60]
  151. [3, 3, 4, 14, 84]
  152. [3, 3, 4, 13, 156]
  153. [3, 3, 4, 20, 30]
  154. [3, 3, 4, 21, 28]
  155. [3, 3, 5, 10, 30]
  156. [3, 3, 5, 9, 45]
  157. [3, 3, 5, 8, 120]
  158. [3, 3, 5, 12, 20]
  159. [3, 3, 6, 9, 18]
  160. [3, 3, 6, 8, 24]
  161. [3, 3, 6, 7, 42]
  162. [3, 3, 6, 10, 15]
  163. [3, 4, 4, 8, 24]
  164. [3, 4, 5, 6, 20]
  165. [3, 5, 5, 6, 10]
  166. [4, 4, 4, 6, 12]
  167. [4, 4, 4, 5, 20]
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 09:18:37 | 显示全部楼层
修改bug:
  1. N()=
  2. {
  3. 5
  4. }
  5. K()=
  6. {
  7. N()-2
  8. }
  9. BEGIN()=
  10. {
  11. 0
  12. }
  13. END()=
  14. {
  15. -1
  16. }
  17. OUTFILENAME()=
  18. {
  19. "/home/zdu/N5.txt"
  20. }
  21. output()=
  22. {
  23. local(V,MM,RR,uu,f,v,v2,a,b,d);
  24. MM=M[K()];
  25. RR=R[K()];
  26. V=MM;
  27. c=c+1;
  28. if(c>=BEGIN()&&(END()<0||c<=END()),
  29. f=divisors(V);
  30. for(u=1,length(f),
  31. for(u2=u,length(f),
  32. v=f[u];v2=f[u2];
  33. if((v+v2)%RR!=0, next());
  34. if(gcd(v,v2)>1,next());
  35. d=(v+v2)/RR*(V/(v*v2));
  36. a=d*v;b=d*v2;
  37. if(a>=n[K()],
  38. n[K()+1]=a;
  39. n[K()+2]=b;
  40. write(OUTFILENAME(),n)
  41. )
  42. )
  43. )
  44. );
  45. if(c%100==0, print("process " c " lines"))
  46. }
  47. search(level)=
  48. {
  49. local(ll,uu,dd);
  50. if(level>=K(),
  51. output(),
  52. ll=floor(M[level]/R[level])+1;
  53. uu=floor((N()-level)*M[level]/R[level]);
  54. if(ll<=n[level],ll=n[level]);
  55. for(i=ll,uu,
  56. n[level+1]=i;
  57. dd=gcd(M[level],i);
  58. M[level+1]=M[level]*i/dd;
  59. R[level+1]=(R[level]*i-M[level])/dd;
  60. A[i%4+1]=A[i%4+1]+1;
  61. search(level+1);
  62. A[i%4+1]=A[i%4+1]-1
  63. )
  64. )
  65. }
  66. search0()=
  67. {
  68. n=vector(N());
  69. M=vector(N());
  70. R=vector(N());
  71. A=vector(4);
  72. c=0;
  73. for(i=2,8,
  74. n[1]=i;
  75. R[1]=i-1;
  76. M[1]=i;
  77. A[i%4+1]=A[i%4+1]+1;
  78. search(1);
  79. A[i%4+1]=A[i%4+1]-1;
  80. )
  81. }
复制代码
N=5的结果很多,有413个
  1. [2, 3, 7, 63, 126]
  2. [2, 3, 7, 56, 168]
  3. [2, 3, 7, 49, 294]
  4. [2, 3, 7, 48, 336]
  5. [2, 3, 7, 45, 630]
  6. [2, 3, 7, 44, 924]
  7. [2, 3, 7, 43, 1806]
  8. [2, 3, 7, 70, 105]
  9. [2, 3, 7, 54, 189]
  10. [2, 3, 7, 46, 483]
  11. [2, 3, 7, 60, 140]
  12. [2, 3, 7, 51, 238]
  13. [2, 3, 7, 78, 91]
  14. [2, 3, 8, 36, 72]
  15. [2, 3, 8, 32, 96]
  16. [2, 3, 8, 30, 120]
  17. [2, 3, 8, 28, 168]
  18. [2, 3, 8, 27, 216]
  19. [2, 3, 8, 26, 312]
  20. [2, 3, 8, 25, 600]
  21. [2, 3, 8, 40, 60]
  22. [2, 3, 8, 42, 56]
  23. [2, 3, 8, 33, 88]
  24. [2, 3, 9, 27, 54]
  25. [2, 3, 9, 24, 72]
  26. [2, 3, 9, 21, 126]
  27. [2, 3, 9, 20, 180]
  28. [2, 3, 9, 19, 342]
  29. [2, 3, 9, 30, 45]
  30. [2, 3, 9, 22, 99]
  31. [2, 3, 10, 20, 60]
  32. [2, 3, 10, 18, 90]
  33. [2, 3, 10, 16, 240]
  34. [2, 3, 10, 24, 40]
  35. [2, 3, 11, 22, 33]
  36. [2, 3, 11, 14, 231]
  37. [2, 3, 11, 15, 110]
  38. [2, 3, 12, 18, 36]
  39. [2, 3, 12, 16, 48]
  40. [2, 3, 12, 15, 60]
  41. [2, 3, 12, 14, 84]
  42. [2, 3, 12, 13, 156]
  43. [2, 3, 12, 20, 30]
  44. [2, 3, 12, 21, 28]
  45. [2, 4, 5, 30, 60]
  46. [2, 4, 5, 25, 100]
  47. [2, 4, 5, 24, 120]
  48. [2, 4, 5, 22, 220]
  49. [2, 4, 5, 21, 420]
  50. [2, 4, 5, 28, 70]
  51. [2, 4, 5, 36, 45]
  52. [2, 4, 6, 18, 36]
  53. [2, 4, 6, 16, 48]
  54. [2, 4, 6, 15, 60]
  55. [2, 4, 6, 14, 84]
  56. [2, 4, 6, 13, 156]
  57. [2, 4, 6, 20, 30]
  58. [2, 4, 6, 21, 28]
  59. [2, 4, 7, 14, 28]
  60. [2, 4, 7, 10, 140]
  61. [2, 4, 7, 12, 42]
  62. [2, 4, 8, 12, 24]
  63. [2, 4, 8, 10, 40]
  64. [2, 4, 8, 9, 72]
  65. [2, 4, 9, 12, 18]
  66. [2, 4, 10, 12, 15]
  67. [2, 5, 6, 10, 30]
  68. [2, 5, 6, 8, 120]
  69. [2, 5, 6, 12, 20]
  70. [3, 4, 5, 6, 20]
  71. [2, 3, 7, 63, 126]
  72. [2, 3, 7, 56, 168]
  73. [2, 3, 7, 49, 294]
  74. [2, 3, 7, 48, 336]
  75. [2, 3, 7, 45, 630]
  76. [2, 3, 7, 44, 924]
  77. [2, 3, 7, 43, 1806]
  78. [2, 3, 7, 70, 105]
  79. [2, 3, 7, 54, 189]
  80. [2, 3, 7, 46, 483]
  81. [2, 3, 7, 60, 140]
  82. [2, 3, 7, 51, 238]
  83. [2, 3, 7, 78, 91]
  84. [2, 3, 8, 36, 72]
  85. [2, 3, 8, 32, 96]
  86. [2, 3, 8, 30, 120]
  87. [2, 3, 8, 28, 168]
  88. [2, 3, 8, 27, 216]
  89. [2, 3, 8, 26, 312]
  90. [2, 3, 8, 25, 600]
  91. [2, 3, 8, 40, 60]
  92. [2, 3, 8, 42, 56]
  93. [2, 3, 8, 33, 88]
  94. [2, 3, 9, 27, 54]
  95. [2, 3, 9, 24, 72]
  96. [2, 3, 9, 21, 126]
  97. [2, 3, 9, 20, 180]
  98. [2, 3, 9, 19, 342]
  99. [2, 3, 9, 30, 45]
  100. [2, 3, 9, 22, 99]
  101. [2, 3, 10, 20, 60]
  102. [2, 3, 10, 18, 90]
  103. [2, 3, 10, 16, 240]
  104. [2, 3, 10, 24, 40]
  105. [2, 3, 11, 22, 33]
  106. [2, 3, 11, 14, 231]
  107. [2, 3, 11, 15, 110]
  108. [2, 3, 12, 18, 36]
  109. [2, 3, 12, 16, 48]
  110. [2, 3, 12, 15, 60]
  111. [2, 3, 12, 14, 84]
  112. [2, 3, 12, 13, 156]
  113. [2, 3, 12, 20, 30]
  114. [2, 3, 12, 21, 28]
  115. [2, 4, 5, 30, 60]
  116. [2, 4, 5, 25, 100]
  117. [2, 4, 5, 24, 120]
  118. [2, 4, 5, 22, 220]
  119. [2, 4, 5, 21, 420]
  120. [2, 4, 5, 28, 70]
  121. [2, 4, 5, 36, 45]
  122. [2, 4, 6, 18, 36]
  123. [2, 4, 6, 16, 48]
  124. [2, 4, 6, 15, 60]
  125. [2, 4, 6, 14, 84]
  126. [2, 4, 6, 13, 156]
  127. [2, 4, 6, 20, 30]
  128. [2, 4, 6, 21, 28]
  129. [2, 4, 7, 14, 28]
  130. [2, 4, 7, 10, 140]
  131. [2, 4, 7, 12, 42]
  132. [2, 4, 8, 12, 24]
  133. [2, 4, 8, 10, 40]
  134. [2, 4, 8, 9, 72]
  135. [2, 4, 9, 12, 18]
  136. [2, 4, 10, 12, 15]
  137. [2, 5, 5, 15, 30]
  138. [2, 5, 5, 12, 60]
  139. [2, 5, 5, 11, 110]
  140. [2, 5, 5, 14, 35]
  141. [2, 5, 6, 10, 30]
  142. [2, 5, 6, 8, 120]
  143. [2, 5, 6, 12, 20]
  144. [2, 6, 6, 9, 18]
  145. [2, 6, 6, 8, 24]
  146. [2, 6, 6, 7, 42]
  147. [2, 6, 6, 10, 15]
  148. [3, 3, 4, 18, 36]
  149. [3, 3, 4, 16, 48]
  150. [3, 3, 4, 15, 60]
  151. [3, 3, 4, 14, 84]
  152. [3, 3, 4, 13, 156]
  153. [3, 3, 4, 20, 30]
  154. [3, 3, 4, 21, 28]
  155. [3, 3, 5, 10, 30]
  156. [3, 3, 5, 9, 45]
  157. [3, 3, 5, 8, 120]
  158. [3, 3, 5, 12, 20]
  159. [3, 3, 6, 9, 18]
  160. [3, 3, 6, 8, 24]
  161. [3, 3, 6, 7, 42]
  162. [3, 3, 6, 10, 15]
  163. [3, 4, 4, 8, 24]
  164. [3, 4, 5, 6, 20]
  165. [3, 5, 5, 6, 10]
  166. [4, 4, 4, 6, 12]
  167. [4, 4, 4, 5, 20]
  168. [2, 3, 7, 84, 84]
  169. [2, 3, 7, 63, 126]
  170. [2, 3, 7, 56, 168]
  171. [2, 3, 7, 49, 294]
  172. [2, 3, 7, 48, 336]
  173. [2, 3, 7, 45, 630]
  174. [2, 3, 7, 44, 924]
  175. [2, 3, 7, 43, 1806]
  176. [2, 3, 7, 70, 105]
  177. [2, 3, 7, 54, 189]
  178. [2, 3, 7, 46, 483]
  179. [2, 3, 7, 60, 140]
  180. [2, 3, 7, 51, 238]
  181. [2, 3, 7, 78, 91]
  182. [2, 3, 8, 48, 48]
  183. [2, 3, 8, 36, 72]
  184. [2, 3, 8, 32, 96]
  185. [2, 3, 8, 30, 120]
  186. [2, 3, 8, 28, 168]
  187. [2, 3, 8, 27, 216]
  188. [2, 3, 8, 26, 312]
  189. [2, 3, 8, 25, 600]
  190. [2, 3, 8, 40, 60]
  191. [2, 3, 8, 42, 56]
  192. [2, 3, 8, 33, 88]
  193. [2, 3, 9, 36, 36]
  194. [2, 3, 9, 27, 54]
  195. [2, 3, 9, 24, 72]
  196. [2, 3, 9, 21, 126]
  197. [2, 3, 9, 20, 180]
  198. [2, 3, 9, 19, 342]
  199. [2, 3, 9, 30, 45]
  200. [2, 3, 9, 22, 99]
  201. [2, 3, 10, 30, 30]
  202. [2, 3, 10, 20, 60]
  203. [2, 3, 10, 18, 90]
  204. [2, 3, 10, 16, 240]
  205. [2, 3, 10, 24, 40]
  206. [2, 3, 11, 22, 33]
  207. [2, 3, 11, 14, 231]
  208. [2, 3, 11, 15, 110]
  209. [2, 3, 12, 24, 24]
  210. [2, 3, 12, 18, 36]
  211. [2, 3, 12, 16, 48]
  212. [2, 3, 12, 15, 60]
  213. [2, 3, 12, 14, 84]
  214. [2, 3, 12, 13, 156]
  215. [2, 3, 12, 20, 30]
  216. [2, 3, 12, 21, 28]
  217. [2, 4, 5, 40, 40]
  218. [2, 4, 5, 30, 60]
  219. [2, 4, 5, 25, 100]
  220. [2, 4, 5, 24, 120]
  221. [2, 4, 5, 22, 220]
  222. [2, 4, 5, 21, 420]
  223. [2, 4, 5, 28, 70]
  224. [2, 4, 5, 36, 45]
  225. [2, 4, 6, 24, 24]
  226. [2, 4, 6, 18, 36]
  227. [2, 4, 6, 16, 48]
  228. [2, 4, 6, 15, 60]
  229. [2, 4, 6, 14, 84]
  230. [2, 4, 6, 13, 156]
  231. [2, 4, 6, 20, 30]
  232. [2, 4, 6, 21, 28]
  233. [2, 4, 7, 14, 28]
  234. [2, 4, 7, 10, 140]
  235. [2, 4, 7, 12, 42]
  236. [2, 4, 8, 16, 16]
  237. [2, 4, 8, 12, 24]
  238. [2, 4, 8, 10, 40]
  239. [2, 4, 8, 9, 72]
  240. [2, 4, 9, 12, 18]
  241. [2, 4, 10, 12, 15]
  242. [2, 5, 5, 20, 20]
  243. [2, 5, 5, 15, 30]
  244. [2, 5, 5, 12, 60]
  245. [2, 5, 5, 11, 110]
  246. [2, 5, 5, 14, 35]
  247. [2, 5, 6, 10, 30]
  248. [2, 5, 6, 8, 120]
  249. [2, 5, 6, 12, 20]
  250. [2, 6, 6, 12, 12]
  251. [2, 6, 6, 9, 18]
  252. [2, 6, 6, 8, 24]
  253. [2, 6, 6, 7, 42]
  254. [2, 6, 6, 10, 15]
  255. [3, 3, 4, 24, 24]
  256. [3, 3, 4, 18, 36]
  257. [3, 3, 4, 16, 48]
  258. [3, 3, 4, 15, 60]
  259. [3, 3, 4, 14, 84]
  260. [3, 3, 4, 13, 156]
  261. [3, 3, 4, 20, 30]
  262. [3, 3, 4, 21, 28]
  263. [3, 3, 5, 15, 15]
  264. [3, 3, 5, 10, 30]
  265. [3, 3, 5, 9, 45]
  266. [3, 3, 5, 8, 120]
  267. [3, 3, 5, 12, 20]
  268. [3, 3, 6, 12, 12]
  269. [3, 3, 6, 9, 18]
  270. [3, 3, 6, 8, 24]
  271. [3, 3, 6, 7, 42]
  272. [3, 3, 6, 10, 15]
  273. [3, 4, 4, 12, 12]
  274. [3, 4, 4, 8, 24]
  275. [3, 4, 5, 6, 20]
  276. [3, 5, 5, 6, 10]
  277. [4, 4, 4, 8, 8]
  278. [4, 4, 4, 6, 12]
  279. [4, 4, 4, 5, 20]
  280. [2, 3, 7, 84, 84]
  281. [2, 3, 7, 63, 126]
  282. [2, 3, 7, 56, 168]
  283. [2, 3, 7, 49, 294]
  284. [2, 3, 7, 48, 336]
  285. [2, 3, 7, 45, 630]
  286. [2, 3, 7, 44, 924]
  287. [2, 3, 7, 43, 1806]
  288. [2, 3, 7, 70, 105]
  289. [2, 3, 7, 54, 189]
  290. [2, 3, 7, 46, 483]
  291. [2, 3, 7, 60, 140]
  292. [2, 3, 7, 51, 238]
  293. [2, 3, 7, 78, 91]
  294. [2, 3, 8, 48, 48]
  295. [2, 3, 8, 36, 72]
  296. [2, 3, 8, 32, 96]
  297. [2, 3, 8, 30, 120]
  298. [2, 3, 8, 28, 168]
  299. [2, 3, 8, 27, 216]
  300. [2, 3, 8, 26, 312]
  301. [2, 3, 8, 25, 600]
  302. [2, 3, 8, 40, 60]
  303. [2, 3, 8, 42, 56]
  304. [2, 3, 8, 33, 88]
  305. [2, 3, 9, 36, 36]
  306. [2, 3, 9, 27, 54]
  307. [2, 3, 9, 24, 72]
  308. [2, 3, 9, 21, 126]
  309. [2, 3, 9, 20, 180]
  310. [2, 3, 9, 19, 342]
  311. [2, 3, 9, 30, 45]
  312. [2, 3, 9, 22, 99]
  313. [2, 3, 10, 30, 30]
  314. [2, 3, 10, 20, 60]
  315. [2, 3, 10, 18, 90]
  316. [2, 3, 10, 16, 240]
  317. [2, 3, 10, 24, 40]
  318. [2, 3, 11, 22, 33]
  319. [2, 3, 11, 14, 231]
  320. [2, 3, 11, 15, 110]
  321. [2, 3, 12, 24, 24]
  322. [2, 3, 12, 18, 36]
  323. [2, 3, 12, 16, 48]
  324. [2, 3, 12, 15, 60]
  325. [2, 3, 12, 14, 84]
  326. [2, 3, 12, 13, 156]
  327. [2, 3, 12, 20, 30]
  328. [2, 3, 12, 21, 28]
  329. [2, 3, 13, 13, 78]
  330. [2, 3, 14, 14, 42]
  331. [2, 3, 15, 15, 30]
  332. [2, 3, 16, 16, 24]
  333. [2, 3, 18, 18, 18]
  334. [2, 4, 5, 40, 40]
  335. [2, 4, 5, 30, 60]
  336. [2, 4, 5, 25, 100]
  337. [2, 4, 5, 24, 120]
  338. [2, 4, 5, 22, 220]
  339. [2, 4, 5, 21, 420]
  340. [2, 4, 5, 28, 70]
  341. [2, 4, 5, 36, 45]
  342. [2, 4, 6, 24, 24]
  343. [2, 4, 6, 18, 36]
  344. [2, 4, 6, 16, 48]
  345. [2, 4, 6, 15, 60]
  346. [2, 4, 6, 14, 84]
  347. [2, 4, 6, 13, 156]
  348. [2, 4, 6, 20, 30]
  349. [2, 4, 6, 21, 28]
  350. [2, 4, 7, 14, 28]
  351. [2, 4, 7, 10, 140]
  352. [2, 4, 7, 12, 42]
  353. [2, 4, 8, 16, 16]
  354. [2, 4, 8, 12, 24]
  355. [2, 4, 8, 10, 40]
  356. [2, 4, 8, 9, 72]
  357. [2, 4, 9, 9, 36]
  358. [2, 4, 9, 12, 18]
  359. [2, 4, 10, 10, 20]
  360. [2, 4, 10, 12, 15]
  361. [2, 4, 12, 12, 12]
  362. [2, 5, 5, 20, 20]
  363. [2, 5, 5, 15, 30]
  364. [2, 5, 5, 12, 60]
  365. [2, 5, 5, 11, 110]
  366. [2, 5, 5, 14, 35]
  367. [2, 5, 6, 10, 30]
  368. [2, 5, 6, 8, 120]
  369. [2, 5, 6, 12, 20]
  370. [2, 5, 7, 7, 70]
  371. [2, 5, 8, 8, 20]
  372. [2, 5, 10, 10, 10]
  373. [2, 6, 6, 12, 12]
  374. [2, 6, 6, 9, 18]
  375. [2, 6, 6, 8, 24]
  376. [2, 6, 6, 7, 42]
  377. [2, 6, 6, 10, 15]
  378. [2, 6, 8, 8, 12]
  379. [2, 7, 7, 7, 14]
  380. [2, 8, 8, 8, 8]
  381. [3, 3, 4, 24, 24]
  382. [3, 3, 4, 18, 36]
  383. [3, 3, 4, 16, 48]
  384. [3, 3, 4, 15, 60]
  385. [3, 3, 4, 14, 84]
  386. [3, 3, 4, 13, 156]
  387. [3, 3, 4, 20, 30]
  388. [3, 3, 4, 21, 28]
  389. [3, 3, 5, 15, 15]
  390. [3, 3, 5, 10, 30]
  391. [3, 3, 5, 9, 45]
  392. [3, 3, 5, 8, 120]
  393. [3, 3, 5, 12, 20]
  394. [3, 3, 6, 12, 12]
  395. [3, 3, 6, 9, 18]
  396. [3, 3, 6, 8, 24]
  397. [3, 3, 6, 7, 42]
  398. [3, 3, 6, 10, 15]
  399. [3, 3, 7, 7, 21]
  400. [3, 3, 8, 8, 12]
  401. [3, 3, 9, 9, 9]
  402. [3, 4, 4, 12, 12]
  403. [3, 4, 4, 8, 24]
  404. [3, 4, 5, 5, 60]
  405. [3, 4, 5, 6, 20]
  406. [3, 4, 6, 6, 12]
  407. [3, 5, 5, 5, 15]
  408. [3, 5, 5, 6, 10]
  409. [3, 6, 6, 6, 6]
  410. [4, 4, 4, 8, 8]
  411. [4, 4, 4, 6, 12]
  412. [4, 4, 4, 5, 20]
  413. [5, 5, 5, 5, 5]
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 09:20:13 | 显示全部楼层
7# mathe 漏了很多解,比如5个1/5。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2010-1-19 09:21:52 | 显示全部楼层
前面要求数据都不重复时N=7的结果也出来了,是190576个,结果文件总共6.1M. 而数据可以重复时,N=6有2996个
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-12-30 03:44 , Processed in 0.032824 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表