Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 16
Image: ubuntu2004
Kernel: Python 3 (system-wide)
def a(n): if n == 1: return 1 elif n == 2: return 2 elif n == 3: return 3 elif n == 4: return 4 else: return a(n-1)+a(n-2)+a(n-4)
a(20)
36894

This would mean that there are 36,894 ways you can walk up a set of stairs when using steps 1,2, and 4.