[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

504.0. "Multiple of 127?" by CLT::GILBERT (Juggler of Noterdom) Tue Jun 10 1986 01:30

What is the smallest number of the form:

	  0     10     20           10k
	10  + 10   + 10   + ... + 10

that is a multiple of 127?
T.RTitleUserPersonal
Name
DateLines
504.1BEING::POSTPISCHILAlways mount a scratch monkey.Tue Jun 10 1986 10:5918
    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
504.2BEING::POSTPISCHILAlways mount a scratch monkey.Wed Jun 11 1986 09:5517
    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
504.3Hot new information!WBCN::APPELLOFCarl J. AppellofWed Jun 11 1986 10:1814
    Advertising wizards are sure to announce a "new and improved" number
    63 which IS prime.  Management will want to pin the blame on some
    underling for the fact that 63 might not be prime (although the
    investigation into the primality might involve a years-long legal
    battle resulting in a Supreme Court decision).  The latest polls
    show that 53% of the population believe that 63 is prime: a clear
    majority.  Boston Herald headline: "63 UNDER INVESTIGATION"
    "NUMBER THEORIST SOUGHT IN PRIME SCAM".

    By the way, as a former chemist, I must point out that experimental
    methods have improved since your last information.  The number 9
    has now been measured to be prime +/- 2.
    
    (-: chemist :-)
504.4CLT::GILBERTJuggler of NoterdomFri Jun 13 1986 18:567
Note 504.1 implies that:

	a mod m          a
	------- mod m = --- mod m
	b mod m          b

Ignoring b mod m = 0, is this ever wrong?
504.5modulus equation usually wrongMODEL::YARBROUGHMon Jun 16 1986 09:222
    Most of the time. Try a = 5, b=2,m=3; the equation in .-1 reduces to 
    1=5/2 mod 3.
504.61 = 5/2 ?LATOUR::JMUNZERMon Jun 16 1986 11:049
    Re 504.5:  isn't that what was desired?
    
    mod 3:	1/2 = 2
    		2/2 = 1
    		3/2 = 0
    		4/2 = 2
    		5/2 = 1
    
    John
504.7BEING::POSTPISCHILAlways mount a scratch monkey.Mon Jun 16 1986 12:177
    Re .4:
    
    I said the modulus had to be prime.  More generally, m should be
    relatively prime to a and b.
    
    
    				-- edp
504.8CLT::GILBERTJuggler of NoterdomMon Jun 16 1986 14:019
I should have asked whether it is ever wrong, when the fractions
reduce to integers.

	a mod m          a
	------- mod m = --- mod m
	b mod m          b

Note that this doesn't affect the argument in 504.1 -- a slight rewording
would make it rigorous.  But then it would not have suggested the above puzzle.
504.9CLT::GILBERTeager like a childMon Nov 10 1986 21:113
Does anybody have an answer for 504.8 yet?  It looks like it
should be easily proved, but it I'm still stumped.  Perhaps
I should go looking for counter-examples, instead.
504.10Proof by Alphabet SoupSSDEVO::LARYTue Nov 11 1986 01:5833
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