4 6n>/-*1
Try it online!
Oasis is a language designed by Adnan which is specialized in sequences.
Here, we shall use the following relationship kindly provided by Stefano Sanfilippo:
Currently, this language can do recursion and closed form.
To specify that a(0)=1
is simple: just add the 1
at the end.
For example, if a sequence begins with a(0)=0
and a(1)=1
, just put 10
at the end.
Unfortunately, all sequences must be 0-indexed.
4 6n>/-*1
1 specify that a(0) = 1
4 push 4
6 push 6 (separated so that it would not be interpreted as 46)
n push n (input)
> add 1
/ divide the two numbers on the top of stack, giving us [4, 6/(n+1)]
- subtract, giving us [4-6/(n+1)]
* multiply; the second argument is missing: takes a(n-1) as second argument.