Template:Simple recursion
![]() | This template uses Lua: |
Usage
{{Simple recursion|left repeated text|non-repeated text|right repeated text|depth}}
Example
"{{Simple recursion|a|b|c|4}}"
gives "aaaabcccc""{{Simple recursion|f( |f(x) + g|) + g|7}}"
gives "f( f( f( f( f( f( f( f(x) + g) + g) + g) + g) + g) + g) + g) + g"- <syntaxhighlight lang="html" inline>φ ≈ 1.6180339887499"</syntaxhighlight> gives "φ ≈ 1.6180339887499" (iterative method, finding the largest of the solutions to )