| The sum of n terms is (10^(10n)-1)/(10^10-1). 10^10 = 61 mod 127, so
the problem is equivalent to asking when (61^n-1)/(61-1) is a multiple
of 127. The division by 60 doesn't affect being a multiple of 127, so
we want to know when 61^n-1 is a multiple of 127, or when 61^n = 1 mod
127. Fermat's Little Theorem tells us 61^126 = 1 mod 127, since 127 is
prime. When b^c = 1 mod p, where p is prime, powers of b in the
form b^d can be congruent to 1 mod p if and only if d is a multiple
of a factor of c, e, such that b^e = 1 mod p. (The proof of that
should be fairly simple; I'll enter it if anybody asks.) So we
need only wonder whether 61, 61^2, or 61^63 are congruent to 1 mod
127. It turns out that 61^63 is (find that out by squaring the
number and taking the remainder when divided by 127 and repeating
that operation five more times. You'll get 61^64 = 61 mod 127,
showing that 61^63 = 1 mod 127). So the answer to the problem is
(10^630-1)/(10^10-1).
-- edp
|
| Peter asked me to supply a proof that 63 is prime, a fact which is
crucial to the preceding response. It is actually quite simple to show
that all odd numbers are prime. 3 is prime, 5 is prime, 7 is prime, so
by induction, all odd numbers are prime. For statisticians, 3, 5, and
7 represent a large enough sample to conclude all odd numbers are
prime. For chemists, 3 is prime, 5 is prime, 7 is prime, 9 is
experimental error, 11 is prime, and so on. For engineers, 3 is prime,
5 is prime, 7 is prime, 9 is prime, 11 is prime, and so on.
I said in my answer that we need to check the numbers 61^e such that
e is a factor of 126. Surprisingly, it turns out 63 is not prime,
so the factors of 126 are 1, 2, 3, 6, 9, 18, 7, 14, 21, 42, 63,
and 126. The smallest of these for which 61^e is congruent to 1
mod 127 is 21, so the answer is (10^210-1)/(10^10-1).
-- edp
|
| I used to love the way Number Theory proofs proliferated variables on their
way to solving the problem, so in that spirit....
x = a mod m; i.e. x < m, and a = nm+x for some n>=0
y = b mod m; i.e. y < m, and b = pm+y for some p>=0
a/b is an integer, so a = bc for some c, and b is not 0
x/y is an integer, so x = dy for some d, and y is not 0
a = bc --> nm+x = pcm+cy --> (n-pc)m = cy-x --> (n-pc)m = (c-d)y
The left side of the equation is a multiple of m, so the right side must
also be a multiple of m. If y is relatively prime to m then (c-d) must be
a multiple of m and therefore:
c mod m = d mod m
(a/b) mod m = (x/y) mod m
(a/b) mod m = ((a mod m)/(b mod m)) mod m
Note that "y is relatively prime to m" implies "b is relatively prime to m".
There seems to be no restriction on the relation between a and m.
If y is not relatively prime to m then all bets are off; for example,
(30 mod 6)/(10 mod 6) mod 6 = 0, while 30/10 mod 6 = 3
Richie
|