Hofstadter Figure-Figure sequences: Difference between revisions
Content added Content deleted
(ffr and ffs defined) |
|||
Line 929: | Line 929: | ||
1. Create two functions named ffr and ffs that when given n return R(n) or S(n) respectively. |
1. Create two functions named ffr and ffs that when given n return R(n) or S(n) respectively. |
||
2. No maximum value for n should be assumed. |
2. No maximum value for n should be assumed. |
||
Line 937: | Line 938: | ||
ffs[j_] := Differences[ffr[j + 1]] |
ffs[j_] := Differences[ffr[j + 1]] |
||
</lang> |
|||
<lang Mathematica> |
|||
ffr[10] |
|||
(* out *) |
|||
{1, 3, 7, 12, 18, 26, 35, 45, 56, 69} |
|||
</lang> |
</lang> |
||