wu :: forums
« wu :: forums - factorials and powers »

Welcome, Guest. Please Login or Register.
Nov 24th, 2024, 10:18am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: towr, william wu, SMQ, Eigenray, ThudnBlunder, Icarus, Grimbal)
   factorials and powers
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: factorials and powers  (Read 675 times)
Christine
Full Member
***





   


Posts: 159
factorials and powers  
« on: Mar 4th, 2015, 5:40pm »
Quote Quote Modify Modify

Is there a formula to determine the number of powers of n between n! and (n+1)! ?
 
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: factorials and powers  
« Reply #1 on: Mar 4th, 2015, 10:51pm »
Quote Quote Modify Modify

I think there's practically only ever one power of n between n! and (n+1)! For any number between n! and (n+1)! multiplying or dividing by n usually takes it out of that range.
 
To find out which power of n, you can use Stirling's approximation for factorials:
ln(n!) ~  n*ln(n) - n + (1/2) ln(2n)
Divide by ln(n), round up, and that power of n will almost certainly have to fall between n! and (n+1)!
« Last Edit: Mar 4th, 2015, 10:57pm by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Christine
Full Member
***





   


Posts: 159
Re: factorials and powers  
« Reply #2 on: Mar 5th, 2015, 1:47pm »
Quote Quote Modify Modify

on Mar 4th, 2015, 10:51pm, towr wrote:
I think there's practically only ever one power of n between n! and (n+1)! For any number between n! and (n+1)! multiplying or dividing by n usually takes it out of that range.
 
To find out which power of n, you can use Stirling's approximation for factorials:
ln(n!) ~  n*ln(n) - n + (1/2) ln(2n)
Divide by ln(n), round up, and that power of n will almost certainly have to fall between n! and (n+1)!

 
How do we know that there's only one power for n > 6?
 
 
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: factorials and powers  
« Reply #3 on: Mar 6th, 2015, 12:25am »
Quote Quote Modify Modify

The a priori probability is about n/(n+1) that there's one, so there might conceivably be two, but it gets increasingly unlikely.
 
ln(n!) = sumi=1..n ln(i), so
Python Code:

from math import log, ceil, floor
log_nfac, log_n_1fac = 0, log(2)
for n in range(2,1000000):
  log_nfac = log_n_1fac
  log_n_1fac += log(n+1)
  if floor(log_n_1fac/log(n)) != ceil(log_nfac/log(n)):
    print(n)

 
2 and 5 are the only ones under 1000000
But that still doesn't prove anything.
With a longer range, I find 28 850 323 and 71 517 600, but I'm not 100% confident in the precision at that point, though. (A lot of tiny rounding errors may have added up)
 
[edit]Running the script with a higher-precision floating point library, I can at least scratch 28 850 323 from the list. Haven't gotten up to the other one yet, because high precision is slow. Though wolfram-alpha says it's also not one. [/edit]
« Last Edit: Mar 6th, 2015, 2:50am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2873
Re: factorials and powers  
« Reply #4 on: Mar 6th, 2015, 8:13am »
Quote Quote Modify Modify

Is 2 between 2 and 6?
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: factorials and powers  
« Reply #5 on: Mar 6th, 2015, 8:44am »
Quote Quote Modify Modify

on Mar 6th, 2015, 8:13am, rmsgrey wrote:
Is 2 between 2 and 6?
If you use inclusive bounds, yes; 2 [2,6].
 
And also if you use half-open intervals that are open at the upper end; 2 [2,6).
 
Also see: http://mathworld.wolfram.com/Between.html
« Last Edit: Mar 6th, 2015, 8:46am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

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