知乎问题:如何用mathematica验证两个猜想(需代码和验证

2021-11-19  本文已影响0人  phyiuang

code:

Do[Print[Module[{}, num = 10000;(*素数列表长度*)

  primeList = Table[Prime[i], {i, 1, num}];

  randomInteger = RandomInteger[{1, num - 5}];

  subList = primeList[[randomInteger ;; randomInteger + 4]];

  Total[If[# == True,1,0] & /@PrimeQ /@Total /@ Drop[DeleteDuplicates[If[Length@# == 3, #, 0] & /@DeleteDuplicates /@Tuples[{subList, subList, subList}]],1]]]],100]

上一篇下一篇

猜你喜欢

热点阅读