Atelier des rouesLab FR
Objects/Documentation

compact47.py

Reproducible program or output for the motifs dossier.

Download ↓
"""Check compact CRT coordinates and the reported median-relative gap address."""
from math import gcd
import json


def experiment():
    left,right=7,30
    reconstructed={(right*u+left*v)%(left*right) for u in range(left) for v in range(right)}
    assert reconstructed==set(range(left*right))
    modulus=614889782588491410
    total=108357096234044  # supplied global count
    mid=modulus//2
    stop=307444891294910147
    def gap_start(x):
        return gcd(x,modulus)==gcd(x+30,modulus)==1 and all(gcd(x+h,modulus)>1 for h in range(1,30))
    # Reflection x -> -30-x. Two short boundary intervals correct the half-period count.

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.