wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> 21!
(Message started by: BNC on Apr 1st, 2003, 12:06pm)

Title: 21!
Post by BNC on Apr 1st, 2003, 12:06pm
21!=510909x21y1709440000

Without calculating 21!, what are the digits marked x and y?

Title: Re: 21!
Post by NickH on Apr 2nd, 2003, 12:42pm
Solution below...

[hide]x+y = 2 (mod 9), since 21! = 0 (mod 9.)
So x+y = 2 or 11.

x-y = 8 (mod 11), since 21! = 0 (mod 11.)
So x-y = 8 or -3.

x+y = 2 is easily ruled out by the mod 11 constraints.

x+y = 11, x-y = 8 has fractional solutions.

x+y = 11, x-y = -3 has solutions x = 4, y = 7.[/hide]

(And yes, I did check the solution with a calculator, but only after I'd derived it!)

Title: Re: 21!
Post by Icarus on Apr 2nd, 2003, 3:40pm
A note of explanation about Nick's solution, for those that are not already familiar with it: [hide]

The notation  "x = y mod n" (read "x is congruent to y modulo n") means that n evenly divides (x-y). That is, x and y differ by a multiple of n. (Usually there is a third line in the "equal" sign, but this isn't available in the average keyboard.)

Nick gets his first formula from the following fact:
every decimal number is congruent modulo 9 to the sum of its digits (this is a slightly stronger version of testing divisibility by 9 by summing the digits). For example,

4753 = 4+7+5+3 = 19 = 1+9 = 10 = 1+0 = 1 mod 9.

His second formula comes from the less well-known result:
every decimal number is congruent modulo 11 to (the sum of the digits in odd positions) minus (the sum of the digits in even positions) For example

4753 = (3 + 7) - (5 + 4) = 1 mod 11.
[/hide]



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board