0

How can i use modular arithmetic to find all numbers that are divisible by 33? I have $33 = 3 \cdot 11$ Which digits sums are positive integers in base 10.

Can i use the euclidean algorithm to find all the postive integers that are divisible by 33 and then back-track with the extended euclidean algorithm to find all x or y but i'dont know which numbers i have to use in the Euclidean algorithm.

And $gcd(3,11) = 1$

Are i on the right trail to solve this problem?

amWhy
  • 209,954
jore12z
  • 65

1 Answers1

2

If you want to use the Euclidean algorithm, which involves a lot of divisions, then you may as well just divide once by $33$ and look at the remainder: $33 \mid n$ if and only if the remainder when $n$ is divided by $33$ is $0$. That is not very interesting mathematically and I suspect it is not what you're looking for as a method.

Here is a much more interesting method to test if a positive integer $n$ is divisible by $33$. Write $n = 10n' + a$, so $a$ is the units digit of $n$. Then $n$ is divisible by $33$ if and only if $n' + 10a$ is divisible by $33$, and since $n' + 10a$ is typically smaller than $n$ we get a recursive procedure that will bring us down to a small number that we can directly check for divisibility by $33$.

Example. Let $n = 24354$. Then $n' = 2435 + 10\cdot 4 = 2475$. We continue this process: $$ 24354 \leadsto 2475 \leadsto 247 + 10\cdot 5 = 297 \leadsto 29 + 10\cdot 7 = 99, $$ and $99$ is divisible by $33$, so the original number is divisible by $33$. In fact, $24354 = 33 \cdot 738$.

Example. Let $n = 5823$. Then we look at $$ 5823 \leadsto 582 + 30 = 612 \leadsto 61 + 20 = 81 \leadsto 8+10=18, $$ and $18$ is not divisible by $33$, so the original number $5823$ is not divisible by $33$.

This method does not appear to involve modular arithmetic, but it does behind the scenes: $33 \mid n$ if and only if $33 \mid (n'+ 10a)$ because $10^2 \equiv 1 \bmod 33$: $$ n \equiv 0 \bmod 33 \Longleftrightarrow 10n' + a \equiv 0 \bmod 33 \Longleftrightarrow n' + 10a \equiv 0 \bmod 33, $$ where we multiplied through by $10$ (an invertible number modulo $33$) in the last equivalence.

This method is a special case of what I call a "universal divisibility test" for divisibility by numbers $m$ that are relatively prime to $10$. It is based on using the inverse of $10 \bmod m$, and when $m = 33$ the number $10$ happens to be its own inverse mod $33$. For more information and examples of this approach, which is based on modular arithmetic for its justification but does not involve modular arithmetic when carrying out the method, look here.

KCd
  • 46,062
  • 1
    Of course this and variants has been proved here many times in the past, e.g. it is the special case of $,t=3,$ of $10t+3\mid 10b+a \iff 10t+3\mid b+(1+3t)a,,$ which is a special case of a more general divisibility test proved there. Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Nov 21 '22 at 15:57