OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Switch[n~Mod~3, 2, Plus, 0, Times, 1, Subtract][a[n - 1], n - 1]; Array[a, 31] (* JungHwan Min, Feb 04 2017 *)
PROG
(Haskell)
a047908 n = a047908_list !! (n-1)
a047908_list =
1 : zipWith ($) (zipWith ($) (cycle [(+), (*), (-)]) a047908_list) [1..]
-- Reinhard Zumkeller, Jul 13 2011
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Miklos SZABO (mike(AT)ludens.elte.hu)
STATUS
approved