%I #15 Feb 06 2024 03:27:36
%S 0,1,5,55,56980,61667666167030,
%T 78172010815921069181209893626754427513955
%N a(0)=0, a(1)=1, a(2)=5 and for n>2: a(n) = a(n-1)*(a(n-1) + 1)*(2*a(n-1) + 1)/6.
%H G. C. Greubel, <a href="/A129440/b129440.txt">Table of n, a(n) for n = 0..8</a>
%F a(n) = A000330(if n<=2 then n else a(n)).
%F a(n) ~ sqrt(3) * c^(3^n), where c = 1.13701835838072682283814038264701129587627956851233106833915157... . - _Vaclav Kotesovec_, Dec 17 2014
%t Flatten[{0, 1, RecurrenceTable[{a[2] == 5, a[n] == a[n-1]*(a[n-1] + 1)*(2*a[n-1] + 1)/6}, a[n], {n, 8}]}] (* _Vaclav Kotesovec_, Dec 17 2014 *)
%t Join[{0,1},NestList[(#(#+1)(2#+1))/6&,5,5]] (* _Harvey P. Dale_, Sep 13 2022 *)
%o (Magma) [0,1] cat [n le 1 select 5 else Self(n-1)*(Self(n-1)+1)*(2*Self(n-1)+1)/6: n in [1..8]]; // _G. C. Greubel_, Feb 06 2024
%o (SageMath)
%o def a(n): # a = A129440
%o if n<3: return (0,1,5)[n]
%o else: return a(n-1)*(a(n-1)+1)*(2*a(n-1)+1)/6
%o [a(n) for n in range(9)] # _G. C. Greubel_, Feb 06 2024
%Y Cf. A000330, A007501, A251702.
%K nonn
%O 0,3
%A _Reinhard Zumkeller_, Apr 15 2007