search

Inverse sum equations

Mon, Jun 29, 2015 02:00 CEST

Tags: Brute Force, Algorithms, Systems of Inequalities

We are given \(k > 0 \in \mathbb{R}\) and \(a_1, a_2, \ldots, a_n \ge 1 \in \mathbb{N}\) such that

$$ a_1 < a_2 < \cdots < a_n. $$

We want to solve the following equation

$$ \frac{1}{a_1} + \frac{1}{a_2} + \cdots + \frac{1}{a_n} = k. $$

Note that we have

$$ \frac{1}{a_1} > \frac{1}{a_2} > \cdots > \frac{1}{a_n} $$

and thus

$$ n \cdot \frac{1}{a_1} > \frac{1}{a_1} + \frac{1}{a_2} + \cdots + \frac{1}{a_n} = k. $$

Hence,

\(a_1 < \frac{n}{k}\)

and we only have a finite number of candidate solutions to test.

Inspired from an exercise in

BÓNA, Miklós. A walk through combinatorics: an introduction to enumeration and graph theory. World scientific, 2011.