enter image description here

How do I construct the figure in the image using the formulae in Mathematica? I defined the following functions for the 4 cases. Can you also explain the significance of these in relation to the Fibonacci Sequence.

SF[m_] := Sum [FF [n], {n,1,m}]
OSF[m_] := Sum [FF [2n-1], {n,1,m}]
ESF[m_] := Sum [FF [2n], {n,1,m}]
SSF[m_] := Sum [FF [n]^2 , {n,1,m}].
  • $\begingroup$ So, this is what you were trying to ask here mathematica.stackexchange.com/q/183624/46583 $\endgroup$
    – ZaMoC
    Commented Oct 12, 2018 at 8:11
  • $\begingroup$ Yes this was the actual question. I was having trouble with uploading the figure and didn't describe the problem properly. Sorry and thanks. $\endgroup$
    – user60670
    Commented Oct 12, 2018 at 9:44

1 Answer 1


ok, here it is

FF = Fibonacci;
f1 = Table[FF[2 n], {n, 0, 10}];
f2 = Table[FF[2 n + 1], {n, 0, 10}];

final = Table[{Rectangle[{0, f1[[m]]}, {f2[[m]], f1[[m + 1]]}], 
Rectangle[{f2[[m]], 0}, {f2[[m + 1]], f1[[m + 1]]}]}, {m, 10}];   

the above table has the coordinates of 20 squares

now we peak as many squares we want using one more table + graphics

Join[{EdgeForm[Thick], Red}, Flatten[final, 1][[;; k]]]], {k, 6}]  

for your example k=6 gives

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.