Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: A bad shuffle

by Anonymous Monk
on Mar 24, 2005 at 10:01 UTC ( #442002=note: print w/ replies, xml ) Need Help??


in reply to Re: A bad shuffle
in thread A bad shuffle

If I'm not mistaken, N! | NN, as N! = 1*2*...*N, and NN = N*N*...*N. Therefore, NN/N! = NN-1/(N-1)!
The fact that NN and N! share a factor doesn't mean that N! is a divisor of NN, as the following table shows:
 N                 NN                 N!             NN % N!
 1                  1                  1                  0
 2                  4                  2                  0
 3                 27                  6                  3
 4                256                 24                 16
 5               3125                120                  5
 6              46656                720                576
 7             823543               5040               2023
 8           16777216              40320               4096
 9          387420489             362880             227529
10        10000000000            3628800            2656000
11       285311670611           39916800           26301011
12      8916100448256          479001600          443667456
13    302875106592253         6227020800         5268921853
14  11112006825558016        87178291200          294332416
15 437893890380859375      1307674368000       820814907375


Comment on Re^2: A bad shuffle
Replies are listed 'Best First'.
Re^3: A bad shuffle
by QM (Vicar) on Mar 24, 2005 at 19:58 UTC
    My bad. Somehow the coffee fairy didn't stop by me, and I'm confusing "share a factor" with "evenly divides".

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://442002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (20)
As of 2015-07-31 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls