login
a(0) = a(1) = 0; thereafter a(n) = a(n-1)*a(n-2) + 2.
2

%I #30 Sep 08 2022 08:45:36

%S 0,0,2,2,6,14,86,1206,103718,125083910,12973452977382,

%T 1622770224612082123622,21052933202100473722674133293917606,

%U 34164073141115747076263787631563122725393126176374288934

%N a(0) = a(1) = 0; thereafter a(n) = a(n-1)*a(n-2) + 2.

%H Vincenzo Librandi, <a href="/A142471/b142471.txt">Table of n, a(n) for n = 0..19</a>

%H A. V. Aho and N. J. A. Sloane, <a href="https://www.fq.math.ca/Scanned/11-4/aho-a.pdf">Some doubly exponential sequences</a>, Fibonacci Quarterly, Vol. 11, No. 4 (1973), pp. 429-437, <a href="http://neilsloane.com/doc/doubly.html">alternative link</a>.

%F a(n) ~ c^(phi^n), where c = 1.278178162398588325773605473403497130099080978627235683548955136178125... and phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - _Vaclav Kotesovec_, May 21 2015

%p a:= proc(n) option remember;

%p if n<2 then 0

%p else a(n-1)*a(n-2) + 2

%p fi; end:

%p seq(a(n), n=0..15); # _G. C. Greubel_, Apr 03 2021

%t a[0] = a[1] = 0; a[n_] := a[n-1] a[n-2] + 2; Table[a[n], {n, 0, 15}] (* _T. D. Noe_, Nov 14 2011 *)

%o (Magma) I:=[0,0]; [n le 2 select I[n] else Self(n-1)*Self(n-2)+2: n in [1..15]]; // _Vincenzo Librandi_, Nov 14 2011

%o (Sage)

%o def a(n): return 0 if n<2 else a(n-1)*a(n-2) + 2

%o [a(n) for n in (0..15)] # _G. C. Greubel_, Apr 03 2021

%Y Cf. A000058, A007660, A143684.

%K nonn

%O 0,3

%A _N. J. A. Sloane_, based on email from Carla J. Garner-Bennett, Nov 13 2008