Riordan numbers: Difference between revisions

added Arturo
(Added 11l)
(added Arturo)
Line 238:
13393689 37458330
</pre>
 
=={{header|Arturo}}==
 
<syntaxhighlight lang="arturo">riordan: function [n].memoize[
if zero? n -> return 1
if one? n -> return 0
 
return ((n-1) * ((2*riordan n-1) + 3*riordan n-2)) / n+1
]
 
riordans: map 0..31 => riordan
 
loop split.every: 4 riordans 'x ->
print map x 's -> pad to :string s 13</syntaxhighlight>
 
{{out}}
 
<pre> 1 0 1 1
3 6 15 36
91 232 603 1585
4213 11298 30537 83097
227475 625992 1730787 4805595
13393689 37458330 105089229 295673994
834086421 2358641376 6684761125 18985057351
54022715451 154000562758 439742222071 1257643249140</pre>
 
=={{header|BASIC}}==
1,532

edits