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”).
%I #15 Sep 20 2021 19:02:02
%S 0,1,1,2,2,0,2,0,-2,-2,4,6,10,60,50,110,5500,5390,10890,58697100,
%T 58686210,117383310,6888781581155100,6888781463771790,
%U 13777563044926890,94910620919839581404684194433100,94910620919839567627121149506210
%N Sequence based on repeating in turn the subtract, add and multiply operations on the previous 2 terms, starting with 0, 1.
%C After a(16) the sequence entries end 100, 90, 90, 100, 10, 10, 100, 90, 90, ... . - _Jon Perry_, Oct 29 2014
%F For n > 2,
%F If n mod 3 = 0, a(n) = a(n-1) - a(n-2),
%F If n mod 3 = 1, a(n) = a(n-1) + a(n-2),
%F If n mod 3 = 2, a(n) = a(n-1) x a(n-2),
%F a(1) = 0, a(2) = 1.
%t nxt[{n_,a_,b_}]:={n+1,b,Which[Mod[n+1,3]==0,b-a,Mod[n+1,3] == 1,a+b,True,a*b]}; NestList[nxt,{2,0,1},30][[All,2]] (* _Harvey P. Dale_, Sep 20 2021 *)
%K sign,easy
%O 1,4
%A _Stuart E Anderson_, Oct 07 2014
%E More terms from _Colin Barker_, Oct 08 2014
%E Edited: Name changed and keyword easy added - _Wolfdieter Lang_, Oct 29 2014
%E Changed name. - _Jon Perry_, Oct 29 2014