Skip to main content
1 of 2
TuxCrafting
  • 4.8k
  • 3
  • 33
  • 46

Oasis, 2 bytes

n!

Surprised nobody posted it yet.

Try it online

Explanation

n!
n   Push n (The argument)
 !  Push the factorial of the top of the stack
    Implicit output

For the recursive version, it's 3 bytes:

n*1
n    Push n
 *   Multiply the two items on the top of the stack
     Because there is only one item on the stack, A(n - 1) is pushed
     Implicit output
  1  Special case A(0) = 1
TuxCrafting
  • 4.8k
  • 3
  • 33
  • 46