Ma · Mathematics

Find All Pairs (x, y) with 0 ≤ x, y ≤ 18 Such That 19 Divides 3x + 4y + 5

Published By the 9to5Science editorial team

At a glance

  1. 1. Read the congruence

    Assume x and y are integers from 0 through 18 and interpret the condition as 19 dividing 3x + 4y + 5.

  2. 2. Isolate y modulo 19

    Use that 5 is the multiplicative inverse of 4 modulo 19 to get y ≡ 4x + 13 (mod 19).

  3. 3. Choose the allowed residues

    For each x from 0 through 18, take the unique representative y between 0 and 18.

  4. 4. List and check

    Record the 19 resulting pairs and verify a sample by substitution.

Advertisement

Assume the condition means that 19 divides 3x+4y+53x+4y+5, where xx and yy are integers in the inclusive range 00 to 1818. The divisibility condition can be solved as a congruence modulo 19. It gives one allowed value of yy for each allowed value of xx, so there are 19 pairs in total.

Convert divisibility to a congruence

The statement 19∣(3x+4y+5)19 \mid (3x+4y+5) means that 3x+4y+53x+4y+5 is congruent to 0 modulo 19:

3x+4y+5≡0(mod19).3x+4y+5 \equiv 0 \pmod{19}.

Rearrange to isolate the term involving yy:

4y≡−3x−5(mod19).4y \equiv -3x-5 \pmod{19}.

To solve for yy, multiply both sides by the inverse of 4 modulo 19. Since 4⋅5=20≡1(mod19)4\cdot 5=20\equiv 1\pmod{19}, that inverse is 5. Therefore,

y≡5(−3x−5)(mod19)≡−15x−25(mod19)≡4x+13(mod19).\begin{aligned} y &\equiv 5(-3x-5) \pmod{19}\\ &\equiv -15x-25 \pmod{19}\\ &\equiv 4x+13 \pmod{19}. \end{aligned}

The last line uses −15≡4(mod19)-15\equiv 4\pmod{19} and −25≡13(mod19)-25\equiv 13\pmod{19}. Thus, for each xx, choose the unique yy from 0 through 18 that is congruent to 4x+134x+13 modulo 19.

List all the pairs

Computing 4x+134x+13 and reducing it to a remainder between 0 and 18 gives:

xxyyxxyyxxyy
013731412
117871516
22911161
361015175
410110189
514124
618138

So the complete solution set is

(0,13),(1,17),(2,2),(3,6),(4,10),(5,14),(6,18),(7,3),(8,7),(9,11),(10,15),(11,0),(12,4),(13,8),(14,12),(15,16),(16,1),(17,5),(18,9).\begin{aligned} &(0,13),(1,17),(2,2),(3,6),(4,10),(5,14),(6,18),\\ &(7,3),(8,7),(9,11),(10,15),(11,0),(12,4),(13,8),\\ &(14,12),(15,16),(16,1),(17,5),(18,9). \end{aligned}

Why this list is complete

There are 19 possible integer values of xx, from 0 through 18. For each fixed xx, the congruence 4y≡−3x−5(mod19)4y\equiv -3x-5\pmod{19} has exactly one solution modulo 19 because 4 has an inverse modulo 19. Each residue class modulo 19 has exactly one representative in the range 0≤y≤180\le y\le18. Hence each of the 19 choices of xx produces exactly one allowed yy, and the table includes every solution.

For example, when x=6x=6, the rule gives y≡4(6)+13=37≡18(mod19)y\equiv4(6)+13=37\equiv18\pmod{19}. Substitution confirms the divisibility:

3(6)+4(18)+5=18+72+5=95=5⋅19.3(6)+4(18)+5=18+72+5=95=5\cdot19.

When x=11x=11, the rule gives y≡57≡0(mod19)y\equiv57\equiv0\pmod{19}, and 3(11)+4(0)+5=38=2⋅193(11)+4(0)+5=38=2\cdot19.

Common mistakes

  • Forgetting to reduce modulo 19. The expression 4x+134x+13 can exceed 18. Reduce it by subtracting 19 as needed; for instance, at x=2x=2 it is 21, so the allowed value is y=2y=2.
  • Using the wrong inverse. The inverse of 4 modulo 19 is 5, not 1/41/4 as an ordinary real number. The check is 4⋅5≡1(mod19)4\cdot5\equiv1\pmod{19}.
  • Including values outside the stated range. A residue such as 21 represents the same class as 2, but only 2 is in the allowed range for yy.
  • Treating the variables as real numbers. Divisibility is defined here for integers. If the variables were not required to be integers, the question would need a different interpretation.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.