Which positive integers N have the property that there exists at least one positive integer multiple of N such that the base 10 representation of that multiple has only even digits?


4 Answers 4


I think that the positive integers with this property are

All of them


First let $N$ be an integer which is divisible by neither $2$ or $5$.
Then, $\gcd(9N, 10) = 1$ and, by Euler's Theorem $$ 10^{\varphi(9N)} \equiv 1 (\text{mod }9N) $$ This means that $9N$ divides $10^{\varphi(9N)}-1$ and $N$ divides $\frac{10^{\varphi(9N)}-1}{9}$ - a number consisting entirely of the digit $1$.
Hence, if $N$ is a number not divisible by $2$ or $5$, it has a multiple which is a repunit.

Now suppose $N = 2^a 5^b M$ where $M$ is neither divisible by $2$ nor $5$ and let $c = \max(a,b)$.
Then there exists a repunit $P$ which is divisible by $M$ and so, $N$ divides $10^cP$ - a number which consists of just 0s and 1s in base 10.

Hence every positive integer $N$ divides into a positive integer which consists entirely of 0s and 1s, in base 10, and if we just double this multiple, we see that every positive integer also divides into a positive integer which consists entriely of 0s and 2s, in base 10, giving the result.

  • 2
    $\begingroup$ I was nearly finished writing up the same proof. +1 $\endgroup$ Jul 19, 2023 at 9:18
  • $\begingroup$ @JaapScherphuis great minds... $\endgroup$
    – hexomino
    Jul 19, 2023 at 10:15
  • 1
    $\begingroup$ ...thinks alike, but fools rarely differ. [don't forget that second part of the quote! XD although I believe in this case only the first case applies] $\endgroup$
    – justhalf
    Jul 20, 2023 at 4:49

The positive integers that have the desired property are

all of them.


Let N be any positive integer.

Let S be the N+1 element set $\left\{2, 22, 222, \ldots 2\cdot\frac{10^{N+1}-1}{9}\right\}$.

Note the final element of S is the base 10 number 222...2 with digit 2 repeated N+1 times.

When you divide positive integers by N, there are only N possible remainders which are 0, 1, 2, ... N-1.

Consider now the remainders after dividing each of the numbers of the N+1 element set S by N. Since there are N+1 computed remainders of S but only N possible distinct remainders, we know that at least two elements of S have the same remainder when divided by N (using the Pigeonhole principle).

Let A and B be two elements of S (with A > B) with the same remainder R.

We can express A and B as follows:

A=iN+R and

where i and j are positive integers.

A-B=(i-j)N. So A-B is a multiple of N.

But A-B is equal to the base 10 number 222...2000...0 where there are one or more 2s followed by one or more 0s.

In conclusion, the positive integer A-B consists of solely even digits and is a multiple of N.

Therefore every positive integer has at least one positive integer multiple such that the base 10 representation of that multiple consists of solely even digits.

Q. E. D.

  • 3
    $\begingroup$ This proof is simpler. $\endgroup$
    – Florian F
    Jul 20, 2023 at 15:17

The answer is:

Every positive integer has this property.


Let $n$ be any positive integer and consider the sequence $2, 22, 222, 2222, ...$. Then, by the pigeonhole principle, two of the first $n+1$ terms (say, the $i$th and $j$th terms with $i>j$) have the same remainder when divided by $n$. Their difference is then a multiple of $n$ with only even digits (and in fact, it is $i-j$ $2$s followed by $j$ $0$s).

  • 2
    $\begingroup$ IMO, this adds nothing to @Will Octagon Gibson's self-answer. $\endgroup$ Jul 21, 2023 at 16:55

A sightly different solution here:

All $N$s satisfy the condition.

Assuming there's at least one $N$ whose positive multiples have all at least one odd digit, no number with all-even digits (let's call them "all-even numbers" or AENs) can be divisible by $N$. An AEN's multiples by powers of 10 are also AENs, but some of the remainders from division by $N$ will be the same thanks to the pigeonhole principle. We can add $N$ of these multiples with the same remainder whose non-zero digits won't overlap, getting an AEN divisible by $N$, no matter what $N$ is.

  • $\begingroup$ I think the first two steps are are not needed since your proof is not by contradiction and you don't use the fact that the remainders not all different. $\endgroup$ Jul 23, 2023 at 22:23
  • $\begingroup$ Yup, I had a different idea in mind initially, so later deleted some stuff, but forgot to remove all those parts. $\endgroup$
    – Nautilus
    Jul 23, 2023 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.