---
title: "Counting Solutions to 1/x + 1/y = 3/20 in Positive Integers"
organization: "NityaDhi Digital Mathematics Lab (Asa Edtech Private Limited)"
url: "https://www.nityadhi.com/problems/hard-olympiad-nt-w1-diophantine-egyptian-fraction-3-20"
board: "Olympiad"
grade: "Olympiad"
published_at: "2026-11-29T16:30:00+05:30"
---

# Counting Solutions to 1/x + 1/y = 3/20 in Positive Integers

Find the number of ordered pairs of positive integers $(x, y)$ satisfying
$$\frac{1}{x} + \frac{1}{y} = \frac{3}{20}.$$

## Textbook Solution

Clear denominators by multiplying by $20xy$:
$$20y + 20x = 3xy \implies 3xy - 20x - 20y = 0.$$
Multiply by $3$ and complete the Simon's Favorite Factoring Trick rectangle:
$$9xy - 60x - 60y = 0 \implies (3x - 20)(3y - 20) = 400.$$
Let $d_1 = 3x - 20$ and $d_2 = 3y - 20$, so $d_1 d_2 = 400 = 2^4 \cdot 5^2$.

First, rule out negative divisors: if $d_1, d_2 < 0$, since $x \ge 1 \implies d_1 \ge -17$, we would have $|d_1| \le 17$, forcing $|d_2| = \frac{400}{|d_1|} \ge \frac{400}{17} > 23$, so $d_2 \le -24 < -17$, giving $y \le 0$. Thus $d_1, d_2 > 0$.

Second, $x$ and $y$ are integers if and only if $d_1 \equiv -20 \equiv 1 \pmod 3$ and $d_2 \equiv 1 \pmod 3$. Note that since $400 \equiv 1 \pmod 3$, whenever $d_1 \equiv 1 \pmod 3$, $d_2 = 400/d_1 \equiv 1 \pmod 3$ holds automatically (and $d_1 > 0 \implies 3x = d_1 + 20 > 20 \implies x \ge 7 \ge 1$).

Now count the positive divisors $d_1 = 2^a 5^b$ ($0 \le a \le 4$, $0 \le b \le 2$) satisfying $2^a 5^b \equiv 1 \pmod 3$:
Since $2 \equiv -1 \pmod 3$ and $5 \equiv -1 \pmod 3$,
$$2^a 5^b \equiv (-1)^{a+b} \pmod 3.$$
Thus $d_1 \equiv 1 \pmod 3$ if and only if $a + b$ is **even**:
- Both $a, b$ even: $a \in \{0, 2, 4\}$ ($3$ choices) and $b \in \{0, 2\}$ ($2$ choices) $\implies 3 \times 2 = 6$ divisors.
- Both $a, b$ odd: $a \in \{1, 3\}$ ($2$ choices) and $b \in \{1\}$ ($1$ choice) $\implies 2 \times 1 = 2$ divisors.

Total number of valid ordered pairs $(x, y)$ is $6 + 2 =$ **$8$**.

## Vedic Shortcut

Use the **Modular Divisor Parity Trick**!
For $(3x - 20)(3y - 20) = 400 = 2^4 \cdot 5^2$:
- Every prime factor of $400$ ($2$ and $5$) is $\equiv -1 \pmod 3$.
- Therefore, a divisor $2^a 5^b$ is $\equiv 1 \pmod 3$ **iff $a + b$ is even**!
- Out of the $(4+1)(2+1) = 15$ positive divisors of $400$, one more divisor has $a+b$ even than odd (since $(1+(-1)+\dots) \times (1+(-1)+1) = 1 \cdot 1 = 1$), so there are $\frac{15 + 1}{2} =$ **$8$** valid divisors immediately!

## Common Mistakes

- **Counting all $15$ positive divisors of $400$**: Unlike $\frac{1}{x}+\frac{1}{y}=\frac{1}{n}$, here $3x - 20 = d$ does not always yield an integer $x$; only divisors $\equiv 1 \pmod 3$ work.
- **Forgetting to double-check negative divisors**: In general $(ax - b)(ay - b) = b^2$, negative divisors *can* sometimes give positive solutions if $b > a$ (though here $d_1 \ge -17$ fails because $400/17 > 17$).