Multiply or Divide by n Here's a simple challenge, so hopefully lots of languages will be able to participate.
Given a positive integer \$n\$, output \$A076039(n)\$ from the OEIS.
That is, start with \$a(1)=1\$. Then for \$n&gt;1\$:
$$a(n)=\left\{ \begin{array}{ll} n\cdot a(n-1), &amp; \text{if } n&gt;a(n-1)  \\ \lfloor a(n-1)/n \rfloor, &amp; \text{otherwise.}\end{array} \\ \right. $$
Test cases:
1 -> 1
2 -> 2 (2 > 1, so multiply)
3 -> 6 (3 > 2, so multiply)
4 -> 1 (4 &lt; 6, so divide and take the integer part)
5 -> 5 
6 -> 30
17 -> 221
99 -> 12
314 -> 26

More test cases can be found on the OEIS page.
Per usual sequence rules, you can input and output in a generally accepted manner: 1- or 0-based indexing, output an infinite sequence, output the first \$n\$ values, output only the \$n^\text{th}\$ value, and so forth, but specify that in your answer.
This is code-golf, so shortest code in bytes in each language wins!
Jelly, 6 bytes
R×:&lt;?/

A monadic Link accepting a positive integer, \$n\$, which yields a positive integer, \$a(n)\$.
Try it online! Or see the test-suite.
How?
R×:&lt;?/ - Link:
R      - range -&gt; [1..n]
     / - reduce by (i.e. evaluate f(f(...f(f(f(1,2),3),4),...),n) with this f(a,b):
    ?  -   if...
   &lt;   -   ...condition: (a) less than (b)?
 ×     -   ...then: multiply -&gt; a×b
  :    -   ...else: integer divide -&gt; a//b


Output the sequence up to \$a(n)\$ with:
R×:&lt;?\