Python 3.8+, 45 39 bytes
-2 thanks to xnor (while print(...)!=0:
→ while[print(...)]:
)
-4 thanks to Neil ([a*n,a//n][a>n]
→ a//n or a*n
)
a=n=1
while[print(a:=a//n or a*n)]:n+=1
A full program which prints \$a(n)\$ for all natural numbers.
As a recursive function, 5349:
f=lambda v,n=1,a=1:a*(v<n)or f(v,n+1,[a*n,a//n][a>n]n or a*n)