# Fastest Growing Hierarchy

This topic is 2198 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

UPDATE: I figured it out. If you're interested, here was my problem and the solution is below.

In trying to write a recursive function that returns the fastest growing hierarchy (a really fast growing function).

Here is the definition:

Base function f[sub]0[/sub]: f[sub]0[/sub](n) = n+1

Next function f[sub](a+1)[/sub]: f[sub](a+1)[/sub](n) = f[sub]a[/sub][sup]n[/sup](n)

Functional powers: f[sup](a+1)[/sup](n) = f(f[sup]a[/sup](n)) where f[sup]0[/sup](n) = n

#include <iostream> using namespace std; int hf(int, int); int f(int x, int power, int functionalBase) { if (power==1) return hf(x, functionalBase); else return f(f(x, power-1, functionalBase),1, functionalBase); } int hf(int x, int functionalBase) { if (functionalBase==0) return x+1; else return f(x,x,functionalBase-1); } int main() { cout << f(2, 2, 2); } Edited by sooner123

1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633701
• Total Posts
3013436
×