Can a Sequence of 1's and 0's Be a Multiple of Any Integer?

  • Context: Graduate 
  • Thread starter Thread starter Kummer
  • Start date Start date
  • Tags Tags
    Divisibility Fun
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
14 replies · 6K views
Kummer
Messages
296
Reaction score
0
Show that for any n>1 we can construct a positive integer consisting of only 1's and 0's such that this integer is a multiple of n.
 
on Phys.org
matt grime said:
Interesting variation: show that if n is no divisbible by 2 or 5, then there you can choose this multiple to have precisely two 1s and the rest of the digits 0.

Can you show example answers for, say, n=3 or n=9?

I do wonder how interesting a 'minimal' condition would make this though.
 
A Big Hint

Given (n+1) integers show that there exists two whose difference is a divisible by n.
 
The problem is fairily easy...

[tex]k=\sum_{i=1}^{n} 10^{i\phi(n)}[/tex]
where [itex]\phi(n)[/itex] is the Euler Totient function.

Is divisible by [itex]n[/itex].

Alternatively, if we take [itex]n^2-n+1[/itex] integers then at least [itex]n[/itex] of them must have the same residue mod [itex]n[/itex], so their sum is equal to zero mod [itex]n[/itex], so if we take the first [itex]n^2-n+1[/itex] powers of 10, some sum will be equal to zero mod n, and that sum will clearly be zeros and ones.
 
matt grime said:
My special case was: if 10 and n are coprime, let r be the order of 10 in the units mod n, then 10^r-1 is divisble by n.

But that's all 9's. Of course, this leads to a marginally more challenging version:

Show that every number has a (non-trivial) multiple which is some number of ones, followed by some number of zeros.
 
My version is the easiest if you used my hint.

Theorem: If there are (n+1) distinct integers then there exists two who difference is divisible by n.

Proof: Each of these integers leaves a remainder between 0 and n-1 inclusive upon division by n. Since there are n possible remainders and (n+1) integers that means there exist two which have the same remainder by the PigeonHole Principle. So their difference is divisible by n.

Theorem: Given any positive integer n we can find a positive number consisting of only 1's and 0's which is divisible by n.

Proof: Construct the sequence of (n+1) integers:
1,11,111,...,111...1
By the first theorem two of these when subtracted are divisible by n. But when we subtract them we end up with a number consisting of only 1's and 0's. In fact, the 1's and 0's are groupped together which answers the more difficult question stated by NateTG
 
matt grime said:
Kummer, I think you're under the mistake apprehension that we found your question hard...

The question is not hard. It is fun and I wanted to show it to you.
 
Here's another (but very similar) way of showing it:

consider the sequence 10^m mod n. This is periodic, by the pigeon hole principle. There for there are s,r integers with 10^s=10^{s+kr} mod n for k natural numbers k. Just add up any n different such powers of 10.
 
I should have been more pedantic: the sequence is eventually periodic. It need not be periodic. The idea being that at some point you must have a repeated residue, and then it becomes periodic - if 10 were invertible, then you could guarantee to run it backwards too. Eg. say n=100, the sequence goes 10,0,0,0,0,0,...