OFFSET
1,1
FORMULA
For n odd a(n) = a(n-1) - a(n-2),
For n even a(n) = a(n-1) * a(n-2),
a(1) = 3, a(2) = 2.
EXAMPLE
For n = 3, a(n) = a(2) - a(1) = 2 - 3 = -1.
MATHEMATICA
a248505[n_Integer] := Module[{f},
f[1] = 3; f[2] = 2; f[k_] := If[EvenQ[k], f[k - 1] * f[k - 2], f[k - 1] - f[k - 2]]; f /@ Range[n]]; a248505[21] (* Michael De Vlieger, Nov 17 2014 *)
PROG
(PARI) v=[3, 2]; for(n=1, 20, if(n%2, v=concat(v, v[#v]-v[#v-1])); if(!(n%2), v=concat(v, v[#v]*v[#v-1]))); v \\ Derek Orr, Oct 29 2014
CROSSREFS
KEYWORD
sign
AUTHOR
Stuart E Anderson, Oct 07 2014
EXTENSIONS
More terms from Colin Barker, Oct 07 2014
STATUS
approved