login
a(1) = 1, a(2) = 2, a(n) = a(n-1)^a(n-2).
4

%I #34 Nov 29 2023 07:44:55

%S 1,2,2,4,16,65536,

%T 115792089237316195423570985008687907853269984665640564039457584007913129639936

%N a(1) = 1, a(2) = 2, a(n) = a(n-1)^a(n-2).

%t RecurrenceTable[{a[1]==1, a[2]==2, a[n]==a[n-1]^a[n-2]}, a, {n, 7}] (* _Vincenzo Librandi_, Dec 17 2015 *)

%o (Magma) I:=[1,2]; [n le 2 select I[n] else Self(n-1)^Self(n-2): n in [1..7]]; // _Vincenzo Librandi_, Dec 17 2015

%o (PARI) a(n) = if(n<3, n, a(n-1)^a(n-2)); \\ _Altug Alkan_, Dec 17 2015

%K easy,nonn

%O 1,2

%A Matt Kasper (matt192837(AT)hotmail.com)

%E Name changed and first term added by _Natan Arie Consigli_, Dec 17 2015