10未満の値の逆数の和であって誤差1%未満のもの(2, 4, 7, 9) 1.0040
(2, 5, 6, 7) 1.0095
(2, 5, 6, 8) 0.9917
(3, 4, 6, 7, 9) 1.0040
(4, 5, 6, 7, 8, 9) 0.9956pythonfrom itertools import combinations
for n in range(4, 10):
for xs in combinations(range(2, 10), n):
s = sum(1 / x for x in xs)
if abs(s - 1) < 0.01:
print(xs, "%.4f" % s)