- 注册时间
- 2008-11-26
- 最后登录
- 1970-1-1
- 威望
- 星
- 金币
- 枚
- 贡献
- 分
- 经验
- 点
- 鲜花
- 朵
- 魅力
- 点
- 上传
- 次
- 下载
- 次
- 积分
- 149507
- 在线时间
- 小时
|
发表于 2018-9-12 09:05:59
|
显示全部楼层
啥都不说,给出前8000个素数的解。
- (*根据立方和相等,找出立方和相等的数据,立方和唯一的数据被删除掉*)
- Clear["Global`*"];(*Clear all variables*)
- (*产生前8000个素数序列,所有可能的2个*)
- mylist=Subsets[Prime@Range@8000,{2}];
- (*增加第三项,求立方和*)
- mylist3=Append[#,Total[#^3]]&/@mylist;
- (*选出有重复的数据*)
- cf=Select[Tally[#[[3]]&/@mylist3],#[[2]]>1&]
- (*只要第一个数据*)
- cf1=Map[#[[1]]&,cf]
- (*选出重复的数据,并且按照第三列排序*)
- Grid@Sort[Select[mylist3,MemberQ[cf1,#[[3]]]&],Or[And[#1[[3]]==#2[[3]],#1[[1]]<#2[[1]]],#1[[3]]<#2[[3]]]&]
复制代码
运行结果
{61,1823,6058655748}
{1049,1699,6058655748}
{31,1867,6507811154}
{397,1861,6507811154}
{593,2333,12906787894}
{1787,1931,12906787894}
{71,2741,20593712932}
{977,2699,20593712932}
{1321,5167,140253191624}
{3853,4363,140253191624}
{1567,6619,293833825922}
{3769,6217,293833825922}
{1637,10271,1087909914364}
{7481,8747,1087909914364}
{269,10333,1103283061146}
{6719,9283,1103283061146}
{751,11083,1361780473538}
{8731,8863,1361780473538}
{103,11243,1421173058634}
{3137,11161,1421173058634}
{739,11393,1479220098876}
{5503,10949,1479220098876}
{2393,11743,1633040181864}
{7517,10651,1633040181864}
{4751,13687,2671279610454}
{9283,12323,2671279610454}
{2357,16069,4162315049802}
{9511,14891,4162315049802}
{5987,16889,5031989043172}
{13397,13799,5031989043172}
{2029,18313,6149910060686}
{13633,15349,6149910060686}
{401,18427,6257032101684}
{13963,15233,6257032101684}
{12377,18233,7957454481970}
{15731,15959,7957454481970}
{1249,20921,9158824131210}
{5323,20807,9158824131210}
{2857,21001,9285643179794}
{10627,20071,9285643179794}
{8539,21023,9914079433986}
{12577,19937,9914079433986}
{2803,23339,12734984142846}
{3169,23333,12734984142846}
{9643,25541,17558162386128}
{18671,22273,17558162386128}
{1193,26947,19569014316180}
{14051,25609,19569014316180}
{3527,26993,19711569892840}
{9689,26591,19711569892840}
{12919,27823,23694510438326}
{21313,24109,23694510438326}
{9967,28403,23903696440890}
{17791,26339,23903696440890}
{2659,29191,24892873692050}
{12421,28429,24892873692050}
{3121,29531,25783793868852}
{21019,25457,25783793868852}
{18493,27739,27668272853576}
{20947,26437,27668272853576}
{3557,30403,28147786310520}
{6521,30319,28147786310520}
{7229,31583,31881373102276}
{24989,25343,31881373102276}
{16741,31151,34920307692972}
{24019,27617,34920307692972}
{12227,33199,38418992120682}
{26641,26921,38418992120682}
{19121,32191,40349140452432}
{23447,30169,40349140452432}
{10103,34369,41628850028136}
{23917,30347,41628850028136}
{2663,35509,44791795225476}
{18959,33613,44791795225476}
{26687,32971,54848714059314}
{27901,32117,54848714059314}
{7547,38431,57190204873314}
{21821,36037,57190204873314}
{7687,38839,59041610175422}
{20641,36901,59041610175422}
{26711,35543,63959342311438}
{31469,32009,63959342311438}
{23321,37547,65616474771484}
{26513,36083,65616474771484}
{1087,41893,73524481714460}
{30181,35839,73524481714460}
{2399,42239,75373805625118}
{4793,42221,75373805625118}
{3823,42943,79247114338574}
{19717,41521,79247114338574}
{4969,43177,80615555371442}
{6067,43159,80615555371442}
{16843,44131,90725249729198}
{25639,41959,90725249729198}
{10177,44959,91930197281312}
{23869,42787,91930197281312}
{19937,43867,92338506485316}
{31847,39157,92338506485316}
{8573,46199,99234808847116}
{36683,36809,99234808847116}
{12487,48119,113363606454462}
{28867,44699,113363606454462}
{13297,49009,120064884256802}
{24907,47119,120064884256802}
{13687,50647,132479602223726}
{14389,50593,132479602223726}
{11717,51871,141172750388124}
{32063,47653,141172750388124}
{1831,53951,157041875383542}
{21067,52859,157041875383542}
{9739,54319,161194855594178}
{36523,48271,161194855594178}
{2017,54521,162074028601674}
{11927,54331,162074028601674}
{2377,55229,168475270130622}
{41719,45767,168475270130622}
{113,55411,170132767834428}
{35933,49831,170132767834428}
{14057,55201,170983401928794}
{40531,47087,170983401928794}
{10271,55663,173548068451758}
{38449,48869,173548068451758}
{9467,58199,197975677705162}
{45737,46769,197975677705162}
{15313,59393,213101211440754}
{36587,54751,213101211440754}
{4007,60727,224011456048926}
{13513,60509,224011456048926}
{28607,60139,240915517830162}
{45821,52501,240915517830162}
{977,62971,249702788499444}
{40031,57037,249702788499444}
{17713,63689,263898432637866}
{42643,57119,263898432637866}
{1879,64793,272016255759696}
{44159,57073,272016255759696}
{14281,66083,291494575143828}
{18269,65839,291494575143828}
{6553,67289,304953172532946}
{10949,67213,304953172532946}
{3463,68023,314792693502014}
{48991,58207,314792693502014}
{14051,68687,326832767293354}
{53633,55673,326832767293354}
{15091,69061,332817831872552}
{30757,67219,332817831872552}
{19471,69371,341218378175922}
{45887,62539,341218378175922}
{7529,71161,360778116043170}
{50093,61717,360778116043170}
{1307,72763,385242601380390}
{32749,70481,385242601380390}
{7283,72953,388652400201364}
{18917,72551,388652400201364}
{6959,72997,389306049203052}
{25237,71999,389306049203052}
{349,73597,398639547855722}
{17989,73237,398639547855722}
{3469,73757,401286836339802}
{52697,63409,401286836339802}
{19777,76261,451249530018014}
{32491,74707,451249530018014}
{19273,76541,455576265107838}
{20431,76463,455576265107838}
{8011,77029,457563132200720}
{40801,73039,457563132200720}
{7759,77323,462769442643746}
{14827,77167,462769442643746}
{32783,76753,487386401602464}
{41941,74507,487386401602464}
{36313,77489,513169752197466}
{46589,74413,513169752197466}
{15461,80671,528687396368892}
{34039,78797,528687396368892}
|
|