Recamán's sequence
⏸ pause
n = 0
speed ×1
a
n
=
{
define sequence
a
0
=
initial value
back
=
if back > 0 & unused
forward
=
otherwise
terms
=
n = 1 … N
▶ apply
use:
a[n-1]
,
n
,
Math.sin
,
Math.floor
,
Math.abs
, …
examples:
a[n-1]*2 - n
·
a[n-1] + n*n
·
a[n-1] - 2*n