Catalan numbers: Difference between revisions
Content deleted Content added
m →version 1: added/changed whitespace and comments, eliminated the need for a function, optimized some functions. |
m →version 1: indented a statement for alignment. |
||
Line 2,820:
/*──────────────────────────────────Catalan method 3──────────────────────────*/
catalan3: procedure expose c.; parse arg n; if c.n\==. then return c.n
c.n=(4*n-2) * catalan3(n-1) % (n+1);
'''output''' when using the input of: <tt> 0 16 </tt>
<pre>
|