login
A047908
a(n+1) = a(n) op n, where op is successively +, *, -.
1
1, 2, 4, 1, 5, 25, 19, 26, 208, 199, 209, 2299, 2287, 2300, 32200, 32185, 32201, 547417, 547399, 547418, 10948360, 10948339, 10948361, 251812303, 251812279, 251812304, 6547119904, 6547119877, 6547119905, 189866477245, 189866477215
OFFSET
1,2
LINKS
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
Sequence in context: A126126 A090285 A286784 * A125847 A078886 A307796
KEYWORD
easy,nice,nonn
AUTHOR
Miklos SZABO (mike(AT)ludens.elte.hu)
STATUS
approved