Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,16 @@
ClearAll[TwinPrimeCount]
TwinPrimeCount[mx_] := Module[{pmax, min, max, total},
pmax = PrimePi[mx];
total = 0;
Do[
min = 10^6 i;
min = Max[min, 1];
max = 10^6 (i + 1);
max = Min[max, pmax];
total += Count[Differences[Prime[Range[min, max]]], 2]
,
{i, 0, Ceiling[pmax/10^6]}
];
total
]
Do[Print[{10^i, TwinPrimeCount[10^i]}], {i, 9}]