0

Ackermann's function and all the up-arrow notation is based on exponentiating. We know for a fact that the factorial function grows faster than any power law so why not build an iterative sequence based on factorials? I am thinking of the simple function defined by $$ a(n)=a(n-1)! $$ and to start things off we need $a(1)=3$. The numbers generated are $3,6,24,720$ and the next one ($720!$) is roughly $10^{1746}$ and I can't even start to imagine what happens next!

Is it primitive recursive? Can it be coded up using for loops avoiding calls to itself? I think not but this is just a hunch. Computer scientists might have better chances of answering that than I.

Thanks in advance, I appreciate it.

plus1
  • 431
  • $a(n)$ is the result of applying the factorial operation $n-1$ times to $3,$ which is essentially the same as iterated exponentiation (i.e. tetration -- 4th level operation, and the Ackermann function grows faster than every "finite level operation"), where ${}^kn$ $(n$ with tetrated exponent $k)$ represents $n^{n^{{\cdot}^{{\cdot}^{{\cdot}^{n}}}}}$ $(k$ many occurrences of $n).$ For a little perspective, let $n$ be one googolplex. That is, $n = 10^{10^{100}}$ (i.e. $1$ followed by $10^{100}$ zeros). Now consider $n!!!...!,$ (continued) – Dave L. Renfro Jan 14 '21 at 11:31
  • where the factorial operation is applied a googolplex number of times. The result will be much less than ${}^{{}^4{10}}10$ (i.e. $10$ with tetrated exponent ${}^{4}10,$ which is a $3$-iterate tetration, thus not much when considering the 5th level operation, in the same way that $10\cdot10\cdot4$ is not much when considering the exponentation operation). In fact, ${}^{{}^4{10}}10$ is essentially what you'd get if you applied the factorial operation ${}^{4}10 = 10^{10^{10,000,000,000}}$ many times to a googolplex (or to $3$; for things like this, the size of the base is pretty much irrelevant). – Dave L. Renfro Jan 14 '21 at 11:37
  • By "size of the base is pretty much irrelevant", I mean when the base is described using fewer than the number of digits a person could write in a lifetime, or even such numbers that could be written in a lifetime using an operation lower than the operation being iterated (i.e. for iterated tetration, all bases you can write in a lifetime using the exponentation operation at most once give "essentially" the same result). – Dave L. Renfro Jan 14 '21 at 11:43
  • 1
    @DaveL.Renfro Why is this not an answer though? – Simply Beautiful Art Jun 21 '21 at 01:10
  • @Simply Beautiful Art: I meant to respond and forgot (I've been working on this when I'm able, and otherwise dealing with issues mentioned in my "Update" comment there), but just now I happened to see this meta question, which reminded me. I didn't really address anything specific about primitive recursion (of which I don't know much, except I'm sure all the finite level operations are primitive recursive), and while possibly interesting, (continued) – Dave L. Renfro Jun 25 '21 at 18:45
  • the examples here are essentially the same examples I've posted in sci.math many times since roughly 2002 until maybe 2011 or so (main posts are recorded in this mathoverflow answer), and a few times since then in Stack Exchange comments. At some point (have no idea when), I'll probably incorporate much of that earlier stuff and some little known literature references from the 1800s and early 1900s in an update to this answer, (continued) – Dave L. Renfro Jun 25 '21 at 19:06
  • and while I'm here, I suppose I'll mention that I also plan to post here some extensive exposition already written but never completely finished. Incidentally, back when I wrote the large ordinal number stuff that's "already written but never completely finished" -- saved on a MS Word document I have -- internet connection speeds and computers were such that what I wrote took a ridiculous amount of time to process, and I also greatly exceeded the answer character limit (continued) – Dave L. Renfro Jun 25 '21 at 19:06
  • (so I didn't know what I should do -- one solution I came up with for something like this didn't seem to go over very well). Since then I've found that the processing time for my ordinal notes is MUCH less than it used to be, and also I've found a solution to the answer character length problem -- just post a multi-part answer, like I did here and here. – Dave L. Renfro Jun 25 '21 at 19:06

2 Answers2

1

So you mean the function $a(n)$ defined by $a(1)=3$ and $a(n) = a(n-1)!$.

This function is primitive recursive. Multiplication can be defined by a primitive recursive scheme. Based on this, the factorial function can be defined by a primitive recursive scheme. From here, you can use induction on $n$ to show that $a(n)$ is primitive recursive.

Wuestenfux
  • 20,964
  • But you can't write a program to evaluate it without calling itself, can you? I thought this is what makes a function primitive recursive. – plus1 Jan 19 '21 at 20:33
  • Of course, take the factorial function, its primitive recursive. – Wuestenfux Feb 01 '21 at 14:32
  • Yes its trivial to write a for loop that evaluates n!. Just run from1 to n. However this beast cannot be written in for loops, If you write a program for evaluating a(n) the size of your program will depend on n, Give it a try – plus1 Feb 02 '21 at 15:41
  • Indeed, Ackermann function cannot be written by a loop pgm. it requires unbounded minimalization – Wuestenfux Feb 02 '21 at 15:59
  • Yes and the same goes for the above a(n) – plus1 Feb 03 '21 at 11:17
0

To answer the question concerning writing this in for loops, here's some python-like pseudocode to consider:

# Some integer to compute a(n).
n: int
# Start with 3,
solution = 3
# and then apply the factorial n-1 times.
for i in [1, 2, ..., n-1]:
    # To compute the factorial, start with 1,
    factorial = 1
    # and then multiply by everything from 1 to the current solution
    for j in [1, 2, 3, ..., solution]:
        factorial *= j
    # and save the results.
    solution = factorial
print(solution)