找回密码
 欢迎注册
楼主: 无心人

[讨论] 埃及分数问题

[复制链接]
发表于 2008-3-11 12:07:33 | 显示全部楼层
比如用我现在的程序,计算到30个整数,得到结果是:
Total 0 solution for 1 numbers
Total 0 solution for 2 numbers
Total 1 solution for 3 numbers
Total 6 solution for 4 numbers
Total 62 solution for 5 numbers
Total 642 solution for 6 numbers
Total 5623 solution for 7 numbers
Total 47126 solution for 8 numbers
Total 368680 solution for 9 numbers
Total 2715613 solution for 10 numbers
Total 18876751 solution for 11 numbers
Total 124137535 solution for 12 numbers
Total 774232619 solution for 13 numbers
Total 4595291801 solution for 14 numbers
Total 26030660449 solution for 15 numbers
Total 141031079451 solution for 16 numbers
Total 731862267491 solution for 17 numbers
Total 3641135367129 solution for 18 numbers
Total 17379359388167 solution for 19 numbers
Total 79633646141291 solution for 20 numbers
Total 350541406992141 solution for 21 numbers
Total 1483638948734104 solution for 22 numbers
Total 6043258919626951 solution for 23 numbers
Total 23713645892145709 solution for 24 numbers
Total 89731653445218485 solution for 25 numbers
Total 327751844491903272 solution for 26 numbers
Total 1156694441143387635 solution for 27 numbers
Total 3947960755843772171 solution for 28 numbers
Total -5403296520575906394 solution for 29 numbers
Total 4854137594516025478 solution for 30 numbers

real    6m28.252s
user    6m27.740s
sys     0m0.510s
可以看出,在算到29个数之和时,计数已经溢出了。(使用的是long long,也就是64位有符号整数)
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-3-11 15:33:19 | 显示全部楼层
不限制个数的话
可参与数字不变
最大个数是固定的

从最大的可做分母数字向前加, 直到和超过1
没超过1前有多少分数
最大个数就是多少

应该>50 < 128
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-3-11 15:42:19 | 显示全部楼层
给出我的Linux花了两个小时的计算结果:
Total 0 solutions for 1 numbers
Total 0 solutions for 2 numbers
Total 1 solutions for 3 numbers
Total 6 solutions for 4 numbers
Total 62 solutions for 5 numbers
Total 642 solutions for 6 numbers
Total 5623 solutions for 7 numbers
Total 47126 solutions for 8 numbers
Total 368680 solutions for 9 numbers
Total 2715613 solutions for 10 numbers
Total 18876751 solutions for 11 numbers
Total 124137535 solutions for 12 numbers
Total 774232619 solutions for 13 numbers
Total 4595291801 solutions for 14 numbers
Total 26030660449 solutions for 15 numbers
Total 141031079451 solutions for 16 numbers
Total 731862267491 solutions for 17 numbers
Total 3641135367129 solutions for 18 numbers
Total 17379359388167 solutions for 19 numbers
Total 79633646141291 solutions for 20 numbers
Total 350541406992141 solutions for 21 numbers
Total 1483638948734104 solutions for 22 numbers
Total 6043258919626951 solutions for 23 numbers
Total 23713645892145709 solutions for 24 numbers
Total 89731653445218485 solutions for 25 numbers
Total 327751844491903272 solutions for 26 numbers
Total 1156694441143387635 solutions for 27 numbers
Total 3947960755843772171 solutions for 28 numbers
Total 13043447553133645222 solutions for 29 numbers
Total 41747625741935128710 solutions for 30 numbers
Total 129540734204611317532 solutions for 31 numbers
Total 389928541134334993527 solutions for 32 numbers
Total 1139162509831922598266 solutions for 33 numbers
Total 3231277693474275547299 solutions for 34 numbers
Total 8901590021045958836148 solutions for 35 numbers
Total 23819849114067602314644 solutions for 36 numbers
Total 61919362850772286948383 solutions for 37 numbers
Total 156365639816203671773692 solutions for 38 numbers
Total 383598564986328202178630 solutions for 39 numbers
Total 914148463638254854173623 solutions for 40 numbers
Total 2116119034111607926006968 solutions for 41 numbers
Total 4758030923637283901053352 solutions for 42 numbers
Total 10391110293222050413741803 solutions for 43 numbers
Total 22041068462418175384607338 solutions for 44 numbers
Total 45408014576691017998033935 solutions for 45 numbers
Total 90857029247468416357306657 solutions for 46 numbers
Total 176567171468883278835244560 solutions for 47 numbers
Total 333262613175806630657976453 solutions for 48 numbers
Total 610923770398463077253930786 solutions for 49 numbers
Total 1087694694652090364111474404 solutions for 50 numbers
Total 1880780688432484428364746105 solutions for 51 numbers
Total 3158397915202753846895058366 solutions for 52 numbers
Total 5150785488467963970646151522 solutions for 53 numbers
Total 8157026834722741301575137335 solutions for 54 numbers
Total 12543223332920376988194670045 solutions for 55 numbers
Total 18726871334092621505570220156 solutions for 56 numbers
Total 27142689501555186641211590735 solutions for 57 numbers
Total 38187177105910519189450399353 solutions for 58 numbers
Total 52143143835258841974782182722 solutions for 59 numbers
Total 69091097445134841304408542959 solutions for 60 numbers
Total 88820744650875968151164133353 solutions for 61 numbers
Total 110761276725360855669381536763 solutions for 62 numbers
Total 133951492115763728087377160997 solutions for 63 numbers
Total 157068276242823435228360459893 solutions for 64 numbers
Total 178523614312993956552986849714 solutions for 65 numbers
Total 196626903104697629879907026274 solutions for 66 numbers
Total 209793482810727903429368262481 solutions for 67 numbers
Total 216766118208727094677323844360 solutions for 68 numbers
Total 216808066898173378778614772776 solutions for 69 numbers
Total 209827704948683569908860661374 solutions for 70 numbers
Total 196406293969714181808283981481 solutions for 71 numbers
Total 177720120176198009697354084101 solutions for 72 numbers
Total 155370988226821453619098485782 solutions for 73 numbers
Total 131158750063729392036574144899 solutions for 74 numbers
Total 106840787055651104721535920019 solutions for 75 numbers
Total 83923286392502688067777855037 solutions for 76 numbers
Total 63518356337856569039479451801 solutions for 77 numbers
Total 46283230485676625224695027532 solutions for 78 numbers
Total 32438462031775257025580108065 solutions for 79 numbers
Total 21846378392379761733987650394 solutions for 80 numbers
Total 14122614422937534770335656128 solutions for 81 numbers
Total 8753100160840641418506289493 solutions for 82 numbers
Total 5194846073724042180981317761 solutions for 83 numbers
Total 2948191205876918778431753304 solutions for 84 numbers
Total 1597612185891915207619791884 solutions for 85 numbers
Total 825333871238846849220865900 solutions for 86 numbers
Total 405775896597053499113127765 solutions for 87 numbers
Total 189512941862819047724578235 solutions for 88 numbers
Total 83911815043875563627417544 solutions for 89 numbers
Total 35148537168540940217874804 solutions for 90 numbers
Total 13895882958577286680185075 solutions for 91 numbers
Total 5172179395388437821637660 solutions for 92 numbers
Total 1807559549497097402403963 solutions for 93 numbers
Total 591375369185577930095459 solutions for 94 numbers
Total 180545398796793990351439 solutions for 95 numbers
Total 51253509476818088914645 solutions for 96 numbers
Total 13476276736853769898462 solutions for 97 numbers
Total 3267529059224913889499 solutions for 98 numbers
Total 726975528019038518915 solutions for 99 numbers
Total 147574744420162598036 solutions for 100 numbers
Total 27155086406097713776 solutions for 101 numbers
Total 4494681190875392169 solutions for 102 numbers
Total 663097333817400336 solutions for 103 numbers
Total 86231612060966120 solutions for 104 numbers
Total 9750333391588058 solutions for 105 numbers
Total 942218987055654 solutions for 106 numbers
Total 76109482857533 solutions for 107 numbers
Total 4991106029256 solutions for 108 numbers
Total 255395852500 solutions for 109 numbers
Total 9641616866 solutions for 110 numbers
Total 246620873 solutions for 111 numbers
Total 3676880 solutions for 112 numbers
Total 22385 solutions for 113 numbers
Total 4 solutions for 114 numbers
Total 0 solutions for 115 numbers
Total 0 solutions for 116 numbers
Total 0 solutions for 117 numbers
Total 0 solutions for 118 numbers
Total 0 solutions for 119 numbers
Total 0 solutions for 120 numbers
Total 0 solutions for 121 numbers
Total 0 solutions for 122 numbers
Total 0 solutions for 123 numbers
Total 0 solutions for 124 numbers
Total 0 solutions for 125 numbers
Total 0 solutions for 126 numbers
Total 0 solutions for 127 numbers
Total 0 solutions for 128 numbers
Total 3007198863516917545589795267612 solutions

评分

参与人数 1经验 +3 鲜花 +3 收起 理由
northwolves + 3 + 3 精彩绝伦

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-3-11 15:50:16 | 显示全部楼层
厉害

越来越想知道你了

姓什么叫什么
从哪来到哪去

从实招来
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-3-11 16:08:11 | 显示全部楼层
最后这个计算过程使用的数据内存空间在700多Mega,其实所有使用的算法都在前面提到过了,只是没有写在一起,大家可以想一想应该如何实现。当然代码中还是要使用到大整数运算的,不过这个运算量很小,这部分我是在Windows上用gxqcn的HugeCalc实现的。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-9-14 15:34:13 | 显示全部楼层
63#结果被The On-Line Encyclopedia of Integer Sequences收集为:A144063
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-9-14 23:16:16 | 显示全部楼层
杜朝辉?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-9-15 19:09:51 | 显示全部楼层


呵呵
我猜测是
杜朝晖

32岁
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2008-9-15 20:17:57 | 显示全部楼层
我觉得不是女性吧,女性的话,那有这么多时间逛论坛?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2008-9-15 20:37:33 | 显示全部楼层
mathe可是经常说在照顾女儿的
呵呵
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

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

GMT+8, 2024-4-20 06:28 , Processed in 0.043519 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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