Atelier des rouesLab FR
Objects/Documentation

experience.py

I check both moments against direct counts of every prefix and multiplier on small wheels.

Download ↓
"""Dispersion of prefix variance across invertible dilations of a CRT set."""
from fractions import Fraction
from itertools import combinations
from math import gcd, prod
import json


def moments(local):
    r = prod(local)
    kernel = [r*r-1-6*h*(r-h) for h in range(r)]
    first = Fraction(0)
    second = Fraction(0)
    tables = {}
    for p, values in local.items():
        pairs = [sum((x+h)%p in values for x in values) for h in range(p)]
        orbit = [[pairs[u*h%p] for u in range(1,p)] for h in range(p)]

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.