%I #17 Aug 16 2024 15:54:25
%S 0,1,2,4,13,98,2536,497017,2520869930,2505830419990012,
%T 12633745110864184300787269,63316045634407119326463714272245870904666,
%U 1599837563945889048330164752080268110156603845860584259478831024272
%N a(n) = 2*a(n-1)*a(n-2) - 3*a(n-3), with a(0) = 0, a(1) = 1, a(2) = 2.
%H Robert Israel, <a href="/A055463/b055463.txt">Table of n, a(n) for n = 0..17</a>
%F a(3*n+1) == 1 (mod 12), a(3*n+2) == 2 (mod 12), a(3*n+3) == 4 (mod 12). - _Robert Israel_, Jan 18 2018
%p A[0]:= 0: A[1]:= 1: A[2]:= 2:
%p for n from 3 to 17 do A[n]:= 2*A[n-1]*A[n-2]-3*A[n-3] od:
%p seq(A[i],i=0..17); # _Robert Israel_, Jan 18 2018
%t a[n_]:= a[n]= If[n<3, n, 2*a[n-1]*a[n-2] -3*a[n-3]];
%t Table[a[n], {n,0,15}] (* _G. C. Greubel_, Jan 31 2024 *)
%t nxt[{a_,b_,c_}]:={b,c,2b*c-3a}; NestList[nxt,{0,1,2},20][[;;,1]] (* _Harvey P. Dale_, Aug 16 2024 *)
%o (Magma)
%o function a(n) // a = A055463
%o if n le 2 then return n;
%o else return 2*a(n-1)*a(n-2) - 3*a(n-3);
%o end if;
%o end function;
%o [a(n): n in [0..15]]; // _G. C. Greubel_, Jan 31 2024
%o (SageMath)
%o def a(n): # a = A055463
%o if (n<3): return n
%o else: return 2*a(n-1)*a(n-2) - 3*a(n-3)
%o [a(n) for n in range(16)] # _G. C. Greubel_, Jan 31 2024
%K easy,nonn
%O 0,3
%A _Robert G. Wilson v_, Jul 05 2000