%I #21 Apr 26 2020 15:19:55
%S 1,1,4,31,485,27343,3595117,1359551201,1310562076858,3378072688461451,
%T 22702751567715567129,401359405793550977993221,
%U 18572242457139030215454649193,2252593125544789695036793639095505
%N a(n) is the n-th term of a pseudo-Fibonacci sequence created by applying the function fib(1,...,n) to itself n times.
%C This sequence grows faster than any exponential sequence. The implementation here is quite slow.
%C Let g(x) be fib(1,1,x), g returns y; let h(y) be fib(1,y,x), h returns z; let i(z) be z be applied to itself x-1 times. Then f(x) = i(h(g(x))).
%e n=1: fib(1,1,n);
%e n=2: fib(1,fib(1,1,n),n);
%e n=3: fib(1,fib(1,fib(1,1,n),n),n) ...
%e f(3) is fib(1,fib(1,fib(1,1,3),3),3);
%e f(3) simplifies to fib(1,fib(1,2,3),3);
%e f(3) simplifies to fib(1,3,3);
%e f(3) is 4.
%o (Python)
%o def fib(arb1, arb2, nth):
%o if nth == 0:
%o return arb1
%o if nth == 1:
%o return arb2
%o x = [0]*nth
%o x[0] = arb1
%o x[1] = arb2
%o for i in range(2, nth, 1):
%o x[i] = x[i-1]+x[i-2]
%o return x[-1]
%o def fib2d(n):
%o return fib(1, fib(1, 1, n), n)
%o def fib3d(n):
%o return fib(1, fib(1, fib(1, 1, n), n), n)
%o def slowfibnd(n): # This is an inelegant way to generate a(n)
%o begin = "fib(1, 0+1, n)"
%o for x in range(n-1):
%o begin = begin.replace('0+1', 'fib(1, 0+1, n)')
%o return eval(begin)
%Y Cf. A000045 is the Fibonacci function fib(1, 1, n), A142975 is the Fibonacci function applied to itself fib(1, fib(1, 1, n), n).
%K nonn
%O 1,3
%A Gregory Nisbet (gregory.nisbet(AT)gmail.com), Jul 22 2008