Objects/Documentation
fibres.py
Reproducible program or output for the calibrage dossier.
Download ↓"""Direct fibre enumeration versus the conditional window pair formula."""
from fractions import Fraction as F
from math import gcd
import json
def experiment():
checks=0
for d,q in ((6,5),(10,7),(15,14)):
for length in (1,4,9):
for a in range(d):
mask=[gcd(a+i,d)==1 for i in range(length)]
phi=sum(gcd(t,q)==1 for t in range(q))
mean=F(phi*sum(mask),q)
second=mean
for h in range(1,length):