The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A077383 a(1) = 1, then add, multiply and subtract 2, 3, 4; 5, 6, 7; ... in that order. 6
 1, 3, 9, 5, 10, 60, 53, 61, 549, 539, 550, 6600, 6587, 6601, 99015, 98999, 99016, 1782288, 1782269, 1782289, 37428069, 37428047, 37428070, 898273680, 898273655, 898273681, 24253389387, 24253389359, 24253389388, 727601681640, 727601681609 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Table of n, a(n) for n=1..31. EXAMPLE a(2) = a(1) + 2 = 3, a(3) = 3*3 = 9, a(4) = 9 - 4 = 5, a(5) = 5 + 5 = 10, etc. MAPLE a := proc(n) if n=1 then 1 elif n mod 3 = 2 then a(n-1)+n elif n mod 3 = 0 then n*a(n-1) elif n mod 3 = 1 then a(n-1)-n else fi end: # Emeric Deutsch, Dec 17 2003 MATHEMATICA FoldList[If[Mod[#2, 3]==2, #1+#2, If[Mod[#2, 3]==0, #1*#2, #1-#2]]&, 1, Range[2, 31]] (* James C. McMahon, Oct 10 2023 *) PROG (Python) from itertools import count, islice def A077383_gen(): # generator of terms yield (a:=1) for n in count(2, 3): yield (a:=a+n) yield (a:=a*(n+1)) yield (a:=a-n-2) A077383_list = list(islice(A077383_gen(), 20)) # Chai Wah Wu, Apr 19 2023 CROSSREFS Other operation orders: A077382, A077384, A362269, A362270, A362271, A362272. Sequence in context: A096418 A100811 A223652 * A084492 A327762 A327460 Adjacent sequences: A077380 A077381 A077382 * A077384 A077385 A077386 KEYWORD nonn AUTHOR Amarnath Murthy, Nov 06 2002 EXTENSIONS More terms from Emeric Deutsch, Dec 17 2003 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 19 20:45 EDT 2024. Contains 372703 sequences. (Running on oeis4.)