Atelier des rouesLab FR
Objects/Documentation

inclusion09.py

I provide the computation for “A state collision for primality”.

Download ↓
"""Exact quotient-domain inclusion and the information carried by a sieve state."""
from math import gcd,isqrt
import json


def domain(n):
    d=set();i=1
    while i<=n:
        v=n//i;d.add(v);i=n//v+1
    return d


def experiment():
    # floor(floor(y/m)/j) = floor(y/(mj)).
    for y in range(1,250):
        assert domain(y)=={y//j for j in range(1,y+1)}

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.