Thanks. That's the source of my misunderstanding. I saw the r0 = 0 reference, but I also saw r running 1 .. n and i running 1 to n.

I missed that n-i = 0 whenever n=i. Stupid.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

In reply to Re^3: recursive formula. by BrowserUk
in thread recursive formula. by BioGeek

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":