Hofstadter Figure-Figure sequences: Difference between revisions

→‎version 1: sped up the REXX program by a couple of orders of magnitude.
m (→‎version 1: changed a comment.)
(→‎version 1: sped up the REXX program by a couple of orders of magnitude.)
Line 1,679:
ffs: procedure expose r. s. rr.; parse arg n /*search for ¬null R│S #.*/
if s.n==0 then do k=1 for n /* [↓] 1st IF is a short circuit*/
if s.k\==0 then if ffr(r.k)\==0 then iterate
call ffr k /*define R.k via FFR subroutine*/
km=k-1; _=s.km+1 /*the next S number, possibly. */
_=_+rr._; s.k=_ /*define an element of S array.*/