(MAGMAMagma) [n le 2 select 1 else IsEven(n) select Self(n-1)^2 else Self(n-1)+Self(n-2): n in [1..20]];
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
(MAGMAMagma) [n le 2 select 1 else IsEven(n) select Self(n-1)^2 else Self(n-1)+Self(n-2): n in [1..20]];
editing
approved
Edited and extended and by Bruno Berselli, Feb 25 2016
approved
editing
editing
approved
Extended Edited and extended and edited by Bruno Berselli, Feb 25 2016
approved
editing
proposed
approved
editing
proposed
After 2, subsequence of all terms belong to A238411.
Edited Extended and edited by Bruno Berselli, Feb 25 2016
a[n_] := If[OddQ @ n, a[n - 1] + a[n - 2], a[n - 1]^2]; a[10] = 1; Array[a, 17]