How many positive integer solutions does the equation 2x + 3y = 100 have?

2024

How many positive integer solutions does the equation 2x + 3y = 100 have?

  1. A.

    19

  2. B.

    16

  3. C.

    20

  4. D.

    17

Attempted by 10 students.

Show answer & explanation

Correct answer: B

For a linear equation of the form a·x + b·y = N in two positive integers x and y (with a and b coprime), once one particular solution is known, every other solution is obtained by increasing x by b and decreasing y by a (or vice versa). So the valid x-values form an arithmetic progression (AP) whose common difference equals b (the coefficient of y), and the valid y-values likewise form an AP with common difference a. The count of positive integer solutions is therefore found by: (1) finding the smallest positive x satisfying the required divisibility condition, (2) finding the largest x for which y stays a positive integer, and (3) counting the terms of that AP using n = (last term − first term) ÷ common difference + 1.

  1. Rewrite the equation to isolate y: y = (100 − 2x) ÷ 3. For y to be a positive integer, (100 − 2x) must be a positive multiple of 3.

  2. This gives the congruence 2x ≡ 100 (mod 3), i.e. 2x ≡ 1 (mod 3). Since 2 ≡ −1 (mod 3), this simplifies to −x ≡ 1 (mod 3), i.e. x ≡ 2 (mod 3).

  3. So the valid x-values start at x = 2 and increase by 3 each time: x = 2, 5, 8, … — an AP with first term 2 and common difference 3.

  4. For y to stay a positive integer (y ≥ 1), we need 100 − 2x ≥ 3, i.e. x ≤ 48.5. The largest term of the AP (x ≡ 2 mod 3) not exceeding 48 is x = 47, which gives y = (100 − 94) ÷ 3 = 2.

  5. Counting the terms of the AP 2, 5, 8, …, 47 using n = (last term − first term) ÷ common difference + 1: n = (47 − 2) ÷ 3 + 1 = 15 + 1 = 16.

  • Boundary check: at x = 2, y = 32, so 2(2) + 3(32) = 4 + 96 = 100 ✓

  • Boundary check: at x = 47, y = 2, so 2(47) + 3(2) = 94 + 6 = 100 ✓

  • Shortcut sanity check: since gcd(2, 3) = 1, the rough estimate N ÷ (a × b) = 100 ÷ 6 ≈ 16.67 lands in the same ballpark as the AP-based count above; this quick estimate is only a sanity check, not a rigorous method — it does not always land exactly on the true count — so the AP derivation above remains the reliable way to get the exact answer.

Therefore, the equation 2x + 3y = 100 has 16 positive integer solutions.

Worked reference (handwritten):

Explore the full course: Tcs Live Preparation