本帖最后由 zeroieme 于 2020-2-5 13:37 编辑
简化输出,反正后面非本原三角形放大系数是连续整数。
- Table[{k,j,i},{i,99},{j,i},{k,j}]//Flatten[#,2]&//Parallelize[If[(#//Permutations//#[[1]]+#[[2]]>#[[3]]&/@#&//And@@#&)\[And](Sqrt[p (p-a)(p-b)(p-c)]//.{a->#[[1]],b->#[[2]],c->#[[3]],p->(a+b+c)/2}//IntegerQ),{#[[1]]^2+#[[2]]^2==#[[3]]^2,#/GCD@@#}]&/@#]&//DeleteCases[#,Null]&//GatherBy[#,#[[1]]&]&//({If[#[[1,1]],a^2+b^2==c^2],Length[#],#[[All,2]]//Tally}//Insert[#,Length[#[[-1]]],3]&)&/@#&
复制代码
{{a^2+b^2==c^2,50,16,{{{3,4,5},19},{{5,12,13},7},{{8,15,17},5},{{7,24,25},3},{{20,21,29},3},{{12,35,37},2},{{9,40,41},2},{{28,45,53},1},{{11,60,61},1},{{33,56,65},1},{{16,63,65},1},{{48,55,73},1},{{36,77,85},1},{{13,84,85},1},{{39,80,89},1},{{65,72,97},1}}},{Null,256,150,{{{5,5,6},16},{{5,5,8},12},{{10,13,13},7},{{4,13,15},6},{{13,14,15},6},{{9,10,17},5},{{16,17,17},5},{{11,13,20},4},{{7,15,20},4},{{10,17,21},4},{{13,20,21},4},{{13,13,24},4},{{12,17,25},3},{{14,25,25},3},{{3,25,26},3},{{17,25,26},3},{{17,25,28},3},{{6,25,29},3},{{17,17,30},3},{{11,25,30},3},{{5,29,30},3},{{8,29,35},2},{{15,34,35},2},{{25,29,36},2},{{19,20,37},2},{{15,26,37},2},{{13,30,37},2},{{24,37,37},2},{{16,25,39},2},{{17,28,39},2},{{25,34,39},2},{{10,35,39},2},{{29,29,40},2},{{13,37,40},2},{{25,39,40},2},{{15,28,41},2},{{17,40,41},2},{{18,41,41},2},{{29,29,42},2},{{15,37,44},2},{{17,39,44},2},{{13,40,45},2},{{25,25,48},2},{{29,35,48},2},{{21,41,50},1},{{39,41,50},1},{{26,35,51},1},{{20,37,51},1},{{25,38,51},1},{{13,40,51},1},{{27,29,52},1},{{25,33,52},1},{{37,39,52},1},{{15,41,52},1},{{5,51,52},1},{{25,51,52},1},{{24,35,53},1},{{4,51,53},1},{{51,52,53},1},{{26,51,55},1},{{20,53,55},1},{{25,39,56},1},{{53,53,56},1},{{33,41,58},1},{{41,51,58},1},{{17,55,60},1},{{15,52,61},1},{{22,61,61},1},{{25,52,63},1},{{33,34,65},1},{{20,51,65},1},{{12,55,65},1},{{14,61,65},1},{{36,61,65},1},{{32,65,65},1},{{35,53,66},1},{{65,65,66},1},{{21,61,68},1},{{43,61,68},1},{{7,65,68},1},{{29,65,68},1},{{57,65,68},1},{{29,52,69},1},{{37,37,70},1},{{9,65,70},1},{{41,50,73},1},{{26,51,73},1},{{35,52,73},1},{{19,60,73},1},{{50,69,73},1},{{25,51,74},1},{{25,63,74},1},{{35,44,75},1},{{29,52,75},1},{{32,53,75},1},{{34,61,75},1},{{56,61,75},1},{{13,68,75},1},{{52,73,75},1},{{40,51,77},1},{{25,74,77},1},{{68,75,77},1},{{41,41,80},1},{{17,65,80},1},{{9,73,80},1},{{39,55,82},1},{{35,65,82},1},{{33,58,85},1},{{29,60,85},1},{{39,62,85},1},{{41,66,85},1},{{41,84,85},1},{{26,85,85},1},{{72,85,85},1},{{34,55,87},1},{{52,61,87},1},{{38,65,87},1},{{44,65,87},1},{{31,68,87},1},{{61,74,87},1},{{65,76,87},1},{{53,75,88},1},{{65,87,88},1},{{41,50,89},1},{{28,65,89},1},{{21,82,89},1},{{57,82,89},1},{{78,89,89},1},{{53,53,90},1},{{17,89,90},1},{{37,72,91},1},{{60,73,91},1},{{26,75,91},1},{{22,85,91},1},{{48,85,91},1},{{29,75,92},1},{{39,85,92},1},{{34,65,93},1},{{39,58,95},1},{{41,60,95},1},{{68,87,95},1},{{73,73,96},1},{{37,91,96},1},{{51,52,97},1},{{26,73,97},1},{{44,75,97},1},{{35,78,97},1},{{75,86,97},1},{{11,90,97},1},{{78,95,97},1}}}} |