Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hard Problem

  1. Dec 20, 2007 #1
    Can any of you solve this? :smile:

    Firstly, some notation:

    Let [tex]\Pi(x) = \Gamma(x+1)[/tex] where [tex]\Gamma(x)[/tex] is the usual gamma function i.e. an extension of the factorial to the complex numbers.

    Let [tex]log^{n} (x) = log( log( \cdots log( x ) ) )[/tex] where [tex]log[/tex] is applied n times to x e.g. [tex]log^{4} (x) = log( log( log( log( x ) ) ) )[/tex].

    Similarly, let [tex]{\Pi}^{n} (x) = \Pi( \Pi( \cdots \Pi( x ) ) )[/tex] where [tex]\Pi[/tex] is applied n times to x.


    Let [tex]a_{n} = log^{n} ( {\Pi}^{n} (3) )[/tex].

    Evaluate, using a computer of otherwise, [tex]\lim_{n \rightarrow \infty}{ a_{n} }[/tex] to five decimal places.

    (If you are feeling especially clever try to derive a closed form expression for [tex]\lim_{n \rightarrow \infty}{ a_{n} }[/tex]).
  2. jcsd
  3. Dec 20, 2007 #2
    Even just a discussion on the sort of approaches that people would take to solve such a problem would be interesting.
  4. Dec 20, 2007 #3


    User Avatar
    Science Advisor
    Homework Helper

    With a computer you will soon run into overflow error (e.g. for any n > 3).
  5. Dec 20, 2007 #4
    Did you try to throw Stirling's Approximation at it?
  6. Dec 20, 2007 #5

    Gib Z

    User Avatar
    Homework Helper

    I did, but then I couldn't be bothered to find the general Approximation for iterating it n times. It's the OP's question, so he might have to bother.
  7. Dec 20, 2007 #6
    Of course you will get overflow error if you compute it the naive way. The idea is to write it in a different form so you can calculate it without overflow.

    I have already solved the problem. Just interested in what others have to say about it.
  8. Dec 21, 2007 #7


    User Avatar
    Science Advisor
    Homework Helper

    I'd really like to see a demonstration that the limit is anything other than infinity.
  9. Dec 21, 2007 #8
    Yes I was trying to figure that out too. The only thing I have figured out so far is that it's monotonic increasing:

    [tex]log^{(n)}(\Pi^{(n)}(3)) = log^{n-1}(log(\Pi^{n}(3))) \geq log^{(n-1)}(\Pi^{(n-1)}(3))[/tex]
    [tex]\Leftrightarrow log \Pi^{n}(3) = log \Pi^{(n-1)}(3)! \geq \Pi^{(n-1)}(3)[/tex]
    [tex]\Leftrightarrow \Pi^{(n-1)}(3)! \geq exp(\Pi^{(n-1)}(3))[/tex]
    [tex]\Leftrightarrow \Pi^{(n-1)}(3) \geq 6[/tex] (n! > exp(n) when n >= 6.)
    [tex]\Leftrightarrow n \geq 2[/tex].

    It follows that [tex]a_n \geq a_{n-1}[/tex] for n = 2,3,...
    Still seems like there's a long way to go.

    The following webpage was interesting, but does not seem easy to apply here, if at all possible:http://www.rskey.org/gamma.htm
    Last edited: Dec 21, 2007
  10. Dec 21, 2007 #9


    User Avatar
    Science Advisor
    Homework Helper

    Actually, it should be monotonically decreasing. Which means that the limit may in fact be finite.

    "Loosely," the first PI results in 4!. The first Log application converts that into the sum Log[1] + Log[2] + Log[3] + Log[4] = x < 4 (x is about 3). The second nested PI is then x!. The second nested Log turns this into Log[1] + ... + Log[x] = y < x. (y is about 2.)

    So the first three terms (including n = 0) are 4 > x (approx. 3) > y (approx. 2).
  11. Dec 21, 2007 #10
    My calculations are:
    a_1 = log 3! = 1.79175946922806
    a_2 = log log 3!! = log log 720 = 1.88392094129494

    The javascript calculator at http://www.univie.ac.at/future.media/moe/JavaCalc/jcintro.html has a "loggamma" function, I used it to compute the first three terms:
    a_1 = loggamma(3+1) = 1.7917594692280545
    a_2 = log(loggamma(3!+1)) = 1.8839209412949373
    a_3 = log(log(loggamma(3!!+1))) = 2.1161775528289275
    a_4 = log(log(log(loggamma(3!!!+1)))) = NaN

    But it seems you get stuck no matter what if you try to calculate using
    log N!! = log 2 + ... + log N!, because the log N! term gives NaN.

    Another approach to calculating it is to set

    [tex]s_1 = a_1[/tex]
    [tex]s_{n+1} = a_{n+1}-a_n[/tex], and consider
    [tex]a_n = \sum_{i = 1}^n s_n[/tex].

    So you can add term by term if you can figure out a way to calculate
    [tex]s_n = a_n - a_{n-1} = log^{(n)}(\Pi^{(n)}(3)) - log^{(n-1)}(\Pi^{(n-1)}(3))[/tex]
    [tex]\ \ \ = log( \frac{ log^{(n-1)}(\Pi^{(n-1)}(3)!) }{ log^{(n-2)}(\Pi^{(n-2)}(3)!) } ) [/tex].

    Also from this expression it seems plausible that s_n -> 0 as n -> infinity, or perhaps
    [tex]|\frac{s_{n+1}}{s_n}| \rightarrow L < 1[/tex] as n -> [tex]\infty[/tex], which would show a_n = sum s_n converges.

    But for some reason it seems to me like the answer won't be that simple.. Actually, the root test may be better..
  12. Dec 21, 2007 #11
    I think he's saying, for positive integers k,
    [tex]\Pi(k) = \Gamma(k+1) = k![/tex], so
    [tex]{\Pi}^{n} (3) = 3!!...![/tex], with n !'s.
    [tex]log^{(n)}(\Pi^{(n)}(3)) = log^{(n)}(3!!...!)[/tex].
  13. Dec 21, 2007 #12


    User Avatar
    Science Advisor
    Homework Helper

    Thanks. I started out by assuming Gamma[x] = x!, which should have been (x-1)!.

    I also have been applying the (alternating) Log[PI[Log[PI...]]], which is different than Log[...Log[PI[...PI]]].

    BTW, the alternating function ---> 0.
    Last edited: Dec 21, 2007
  14. Dec 22, 2007 #13
    I don't want to tell you how I solved the problem for a good reason. I found it to be quite interesting and I want to see other creative and unique ideas for solving it. If I tell you how I did it then I probably will not see other creative approaches.

    Here is some carrot: a_4 = 2.1164259
    Last edited: Dec 22, 2007
  15. Dec 22, 2007 #14

    Gib Z

    User Avatar
    Homework Helper

    Thanks for that carrot, now I can give you the answer! That is, provided I get 100 guesses.
  16. Dec 23, 2007 #15
    Okay some more carrot: a_5 = 2.1164259

    Anybody solve it on their own?
  17. Dec 23, 2007 #16


    User Avatar
    Science Advisor
    Homework Helper

    The Grinch in this problem is the memory overflow error (numbers too large for a desktop computer to handle).

    I am thinking a statistical sampling approach.

    Gamma(x) is the expected value of g(t;x) = tx-1 where t is an exponential random variable with mean = 1 (t ~ exp(1)).

    Therefore Gamma(x+1) = E[g(t;x+1)] = E[tx].

    To prevent a memory overflow error, I'd look for a way to scale t and g(t) so that E[g(h(t);x)] = E[k(x)g(t;x)] = k(x)E[g(t;x)] for some functions h and k.

    E.g. let k be a scaling constant and let h(t) = t/k. Then E[g(h(t);x)] = E[g(t/k;x)] = E[tx/kx] = E[tx]/kx. Conversely, if E[tx/kx] = [itex]\mu[/itex] then E[tx] = kx[itex]\mu[/itex].
    Last edited: Dec 23, 2007
  18. Dec 23, 2007 #17
    Sounds interesting.

    Also I would like to see how you guys would go about proving convergence of the sequence.

    The one thing I couldn't do was come up with a closed form expression for the value. The person who set the problem couldn't either so I didn't waste too much time on this.
  19. Dec 23, 2007 #18
    I may have more on this soon (or may not)... Something I was able to show that might help (or might not) is:

    [tex]\frac{log \ log \ N!}{log \ N} \rightarrow 1[/tex] as [tex]N \rightarrow \infty[/tex]


    Use the fact that [tex]N \cdot log(N) - N \leq log(N!) \leq N \cdot log(N)[/tex],
    which can be proved by showing
    [tex]Nlog(N) - N + 1 = \int_1^N log(t) dt \leq log(N!) \leq \int_1^N log(t) + 1 \ dt = Nlog(N)[/tex].

    You then also have to use the fact that [tex]lim_{M \rightarrow \infty} \frac{log(M)}{M} = 0[/tex] to get the limit of the log of the left side and the log of the right side:
    [tex]\frac{log(Nlog(N) - N)}{log(N)} = \frac{log(N) + log(log(N) - 1)}{log(N)} = 1 + \frac{log(log(N) - 1)}{log(N)} \rightarrow 1 + 0 = 1[/tex],
    [tex]\frac{log(Nlog(N))}{log(N)} = \frac{log(N) + log(log(N))}{log(N)} = 1 + \frac{log(log(N))}{log(N)} \rightarrow 1[/tex].

    The claim follows by the squeeze theorem.

    It seems you might be able to apply this to proving convergence as in:

  20. Dec 23, 2007 #19
    Another kind of striking observation...
    Let [tex]exp^n(x) = exp(exp(...exp(x)...))[/tex] (similar to log^n(x)).

    For fixed k >= 1 define a sequence
    [tex]b_n^k = exp^k(a_{n+k}) = log^n(\Pi^{n+k}(3))[/tex].

    Notice that for any sequence c_n and any k >= 1 you have
    [tex]c_n \rightarrow \infty[/tex] if and only if [tex]exp^k(c_n) \rightarrow \infty[/tex].

    It follows that our sequence a_n converges if and only if [tex]b_n^k[/tex] converges for all k. In other words we can instead look at a sequence with starting value [tex]\Pi^{k+1}(3)[/tex] as large as we want. Still not sure if this is going to lead to a solution.
  21. Dec 23, 2007 #20
    Now I have been able to show for k >= 1
    [tex]\frac{log^{k+1}(N!)}{log^k(N)} \rightarrow 1[/tex] as [tex]N \rightarrow \infty[/tex]

    So it seems that's an inch away from proving convergence.
  22. Dec 24, 2007 #21
    OK, the thought process above led me to the following proof that a_n converges. Since I was just looking for the first proof I could find, there perhaps are better proofs, and I didn't address the issue of computing lim a_n or perhaps finding a closed form value. (In fact I didn't "use the 3" in the a_n). If I'm lucky, there will be something in this proof that helps. Please feel free to discuss these things...

    Proof that a_n converges:

    Because of
    We can can instead consider [tex]a_n = log^n(\Pi^n(M))[/tex] for any integer M > 2. (The definition doesn't work for M=1,2.)

    Also use the fact (I'll omit the proof):
    Another fact used is that if c_n >= 1 then log(c_n) <= c_n - 1.

    Choose M such that [tex]\frac{log^2(N!!)}{log(N!)} \leq 1 + \frac{1}{2}[/tex] for all N >= M, and assume log(M!) >= 2. It then follows that [tex]a_{n+1} \geq a_n = log^n(\Pi^n(M)) \geq 2[/tex] for all n >= 1, hence [tex]\frac{a_{n+1}}{a_n} \geq 1[/tex] (a_n is monotonic increasing).

    We now prove by induction that for all k >= 1 [tex]\frac{log^{k+1}(\Pi^{k+1}(N))}{log^k(\Pi^k(N))} \leq 1 + \frac{1}{2^k}[/tex] whenever N >= M.
    As assumed above, the result is true for k = 1. Now suppose the formula is true for k.
    Then [tex]\frac{log^{(k+1) + 1}(\Pi^{(k+1)+1}(N))}{log^{k+1}(\Pi^{k+1}(N))} = \frac{1}{log^{k+1}(\Pi^{k+1}(N))}(log^{k+1}(\Pi^{k+1}(N)) + log^{k+2}(\Pi^{k+2}(N)) - log^{k+1}(\Pi^{k+1}(N))) = 1 + \frac{1}{log^{k+1}(\Pi^{k+1}(N))}log(\frac{log^{k+1}(\Pi^{k+2}(N))}{log^k(\Pi^{k+1}(N))})[/tex]
    ...[tex]\leq 1 + \frac{1}{log^{k+1}(\Pi^{k+1}(N))}(\frac{log^{k+1}(\Pi^{k+2}(N))}{log^k(\Pi^{k+1}(N))} - 1) < 1 + \frac{1}{2}\frac{1}{2^k} = 1 + \frac{1}{2^{k+1}}[/tex].

    Define s_1 = a_1, and [tex]s_{n+1} = a_{n+1} - a_n[/tex]. Then [tex]a_n = \sum_{k=1}^n s_k[/tex].
    We have [tex]s_{n+2} + ... + s_{m+n+2} = log(\frac{ log^{(n+1)}(\Pi^{(n+1)}(M!)) }{ log^n(\Pi^n(M!)))}) + ... + log(\frac{ log^{(m+n+1)}(\Pi^{(m+n+1)}(M!)) }{ log^{m+n}(\Pi^{m+n}(M!)))}) < \frac{1}{2^n} + ... + \frac{1}{2^{n+m}} < \sum_{k = n}^\infty \frac{1}{2^k} = \frac{1}{2^{n-1}}[/tex].

    It follows that for m >= n >= 2, that [tex]a_m - a_n < \frac{1}{2^{n-2}}[/tex]. Thus a_n is Cauchy, hence a_n converges.
    Last edited: Dec 24, 2007
  23. Dec 24, 2007 #22
    Nicely done!
    Last edited: Dec 24, 2007
  24. Dec 24, 2007 #23
    Anybody else calculate a_4 and a_5 to verify my values?
  25. Dec 24, 2007 #24
    The inductive hypothesis includes for all N >= M. (The key point is that in case k = 1 we knew that the log log N!!/log N! term approached 1, so we could choose M large enough so that N >= M implied the term <= 1 + 1/2.)

    What I was getting at was [tex]\frac{log^{k+1}( \Pi^{k+2}(N))}{log^k(\Pi^{k+1}(N))} = \frac{log^{k+1}( \Pi^{k+1}(N!))}{log^k(\Pi^{k}(N!))}[/tex], whereas N! >= N >= M, so the inductive hypothesis can be applied. So the claim I was proving by induction was correct, but I probably should have at least mentioned the N >= M inside the induction proof... that was implicit from context.
    Last edited: Dec 24, 2007
  26. Dec 25, 2007 #25
    After thinking about how to calculate a_4 I came to realize the computational approach leads to a more straightforward proof that a_n converges. That is, once you figure out how to compute a_5, you pretty much get the proof that a_n converges (because it's an increasing sequence and you get an error term on the order of 1 over k factorial).

    To summarize:
    Define [tex]a_n = log^n(\Pi^n(3))[/tex] as before, then we are able to compute:

    a_1 = log 3! = 1.7917594692280545
    a_2 = log log 3!! = 1.8839209412949373
    a_3 = log log log 3!!! = log log (loggamma(3!!+1)) = 2.1161775528289275

    Again, 3!!! is to big to compute, which implies log 3!!!! >= 3!!! is hopeless to compute. So log log 3!!!! is the best place to start.

    By applying the crude inequality [tex]N(log(N)-1) \leq log(N!) \leq Nlog(N)[/tex] you can reduce log log 3!!!! in terms of log 3!!! which we are able to compute (using loggamma) and you get
    ....log 3!!! + log(log(3!!!)-1) <= log log 3!!!! <= log 3!!! + log log 3!!!
    ..which yields
    ....4029.5686567594484 <= log log 3!!!! <= 4029.5689054680583, which has an error of 0.0002487086098881264.

    But the point is that when you take the logarithm of the left and right hand side, that error gets diminished because log(x + e) - log(x) = log(1+e/x) <= e/x.

    In this case (using the smaller term):
    .....log log log 3!!!! - log(4029.5686567594484) <= 0.0002487086098881264/4029.5686567594484 = 6.172090143468014e-8
    .....a_4 - log log(4029.5686567594484) <= 6.172090143468014e-8/log(4029.5686567594484) = 7.434985998001389e-9.
    so a_4 = log log(4029.5686567594484) = 2.1164259359607777 is within 5 decimal points.

    Using an even cruder approximation (N <= log N! <= N + N(logN - 1)) and the idea above it's then very straightforward to show for k >= 4 that [tex]log^{k+1}\Pi^{k+1}(3) - log^k\Pi^k(3) \leq \frac{2}{\Pi^{k-3}(3)\Pi^{k-2}(3)}[/tex], and that's certainly a convergent sequence.

    Now for k >= 5, the error is smaller than [tex]\frac{2}{\Pi^{2}(3)\Pi^{3}(3)}[/tex] and is completely negligible because the 3!!! term is there. The only remaining problem is the error for k = 4 (using the "crude approximation") is 2/(6*720) = 0.000462962962962963 and is not within 5 decimal places, so more modification needed..

    [tex]log^5\Pi^5(3) - log^4\Pi^4(3) = log(\frac{log^4\Pi^5(3)}{log^3\Pi^4(3)}) \leq \frac{log^4\Pi^5(3)}{log^3\Pi^4(3)} - 1 = \frac{1}{log^3\Pi^4(3)}(log^4\Pi^5(3) - log^3\Pi^4(3)) \leq log(\frac{log^3\Pi^5(3)}{log^2\Pi^4(3)}) \leq \frac{log^3\Pi^5(3)}{log^2\Pi^4(3)} - 1[/tex]
    ....[tex]= \frac{1}{log^2\Pi^4(3)}(log^3\Pi^5(3) - log^2\Pi^4(3)) \leq log(\frac{log^2\Pi^5(3)}{log^1\Pi^4(3)}) \leq \frac{log^2\Pi^5(3)}{log^1\Pi^4(3)} - 1 = \frac{1}{log \Pi^4(3)}(log^2\Pi^5(3)-log^1\Pi^4(3)) = \frac{1}{log \Pi^4(3)}log(\frac{log\Pi^5(3)}{\Pi^4(3)})[/tex]
    ....[tex]\leq \frac{1}{log \Pi^4(3)}log(\frac{\Pi^4(3)log\Pi^4(3)}{\Pi^4(3)}) = \frac{log log \Pi^4(3)}{log\Pi^4(3)} \leq \frac{log\Pi^3(3) + log(log\Pi^3(3)-1)}{\Pi^3(3)(log\Pi^3(3)-1)}[/tex]

    If you stare at the last expression on the right hand side long enough, you should realize it's
    ...[tex]\leq \frac{2}{\Pi^3(3)}[/tex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook