Logarithm of the factorial

log x x ! = 11814375113 \large{ \lfloor \log_x x! } \rfloor = 11814375113

What is the value of integer x x such that it satisfy the equation above?

Details and Assumptions

  • x \lfloor x \rfloor is the floor function. ie 123456.789 = 123456 \lfloor 123456.789 \rfloor = 123456 .


The answer is 12345678910.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Vishnu Bhagyanath
Aug 24, 2015

Use Stirling's Approximation to minimize computation and bound the search between 1 0 10 10^{10} and 1 0 11 10^{11} . Also, use the fact that l o g x n = l o g ( n ) l o g ( x ) log_x {n} = \frac{log(n)}{log(x)} .

Abdelhamid Saadi
Sep 15, 2015

Solution based on the Stirling's approximation in python 3.4:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from math import log

def f(x):
    return (1 - x)/log(x) + x + 1/2
def solve(c):
    "Logarithm of the factorial"
    n = 2
    while f(n) < c:
        n *= 2
    m = n//4
    while m > 1:
        if f(n - m) > 11814375113: n = n - m
        m = m//2
    return n

print(solve(11814375113))

Halbert Joshi
Aug 24, 2015

i will upload the answer soon as possible. i will be uploading a snap.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...