🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.misc
Article #45

Re: Tough FACTORIAL math problem...

#45
From: Jos A. Horsmeier
Date: Fri, 16 Feb 1996 17:38
53 lines
2254 bytes
In article <DMvKp5.2wL@undergrad.math.uwaterloo.ca>, 
clgonsal@undergrad.math.uwaterloo.ca wrote:
|In article <4g00u6$gkk@sun001.spd.dsccc.com>,
|Mike McCarty <jmccarty@spd.dsccc.com> wrote:

|>Let's try your technique:
|>
|>       1! = 1 ~ 1
|>       2! = 2x1! ~ 2
|>       3! = 3x2! ~ 3x2 = 6
|>       4! = 4x3! ~ 4x6 = 24 ~ 4
|>       5! = 5x4! ~ 5x4 = 20 ~ 0
|>
|>You should at least think before engaging the fingers.

|Perhaps you should try *reading* before engaging the fingers. You'll notice
|he said "remove all digits except the last NON-ZERO digit". So one gets:
|
|        1! = 1 ~ 1
|        2! = 2x1! ~ 2
|        3! = 3x2! ~ 3x2 = 6
|        4! = 4x3! ~ 4x6 = 24 ~ 4
|        5! = 5x4! ~ 5x4 = 20 ~ 2
|        6! = 6x5! ~ 6x2 = 12 ~ 2
|
|This technique does give the correct result.

Ok, party on ...

	 7! =  7x6!  ~ 7x2 = 14 ~ 4
	 8! =  8x7!  ~ 8x4 = 32 ~ 2
	 9! =  9x8!  ~ 9x2 = 18 ~ 8
	10! = 10x9!  ~10x8 = 80 ~ 8
	11! = 11x10! ~11x8 = 88 ~ 8
	12! = 12x11! ~12x8 = 96 ~ 6
	13! = 13x12! ~13x6 = 78 ~ 8
	14! = 14x13! ~14x8 =112 ~ 2
	15! = 15x14! ~15x2 = 30 ~ 3

erm ... 15! happens to be equal to 130764368000 ...
                                           ^
                                           |
                                           |
                                      See? see? see?

This technique does give the correct result up 'till a certain number ;-)

Jos aka jos@and.nl (the middle initial 'A' stands for 'silly')

ps. No hard feelings, I fell into this trap open eyed yesterday
    and I still feel silly to the core ... ;-)
-- 
Atnwgqkrl gy zit vgksr, ug qshiqwtzoeqs!
Technical Details
Message-ID: <4g2fdq$ibo@beach.and.nl>
Path: arc1-ca.pugleaf.net!beach.and.nl!usenet
References: <4fr8be$ass@news.iconn.net> <31224679.6193@born.com> <4g00u6$gkk@sun001.spd.dsccc.com> <DMvKp5.2wL@undergrad.math.uwaterloo.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!beach.and.nl!usenet
From: jos@and.nl (Jos A. Horsmeier)
Newsgroups: comp.lang.pascal.misc,comp.lang.c++,comp.lang.c,comp.lang.pascal.borland
Subject: Re: Tough FACTORIAL math problem...
Date: 16 Feb 1996 17:38:02 GMT
Organization: AND Operations Research B.V.
Message-ID: <4g2fdq$ibo@beach.and.nl>
References: <4fr8be$ass@news.iconn.net> <31224679.6193@born.com> <4g00u6$gkk@sun001.spd.dsccc.com> <DMvKp5.2wL@undergrad.math.uwaterloo.ca>
NNTP-Posting-Host: klepzeiker.and.nl
Mime-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
X-Newsreader: WinVN 0.99.5