Fibonacci Sequence in BrainF*** I have been trying to write a BrainF*** program that prints the Fibonacci sequence numbers repeatedly. I was wondering whether this is the most efficient way to do it. I basically repeatedly duplicate two cells into a third cell, and shift one cell forward and repeat.

+++++[-&gt;----[----&gt;+&lt;]&gt;++.-[++++&gt;---&lt;]&gt;.++.---------.+++.[++&gt;---&lt;]&gt;--.++[-&gt;+++&lt;]&gt;.+++++++++..---.+++++++.+[--&gt;+++++&lt;]&gt;-.&lt;]
Portability

Your first loop immediately subtracts 4 from a cell whose value is 0.  It seems like your program is designed to run using the wraparound dialect of Brainfuck, so it would be a good idea to note that in a comment.  On the other hand, writing a Fibonacci sequence generator using the 8-bit dialect isn't that useful, because you would overflow after 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233.

However, I'm puzzled by why you would want to do any subtraction at all.  After all, the Fibonacci sequence involves addition, not subtraction.

Readability

There's no need to cram everything on one line.  Best practice would be to insert line breaks after . commands and use indentation to show off the loop structure.  Add some spaces as well, to let your code breathe.

Suggested solution

++++++++++ [-&gt;
   +++&gt;+++++++&gt;++++++++++&gt;+++++++++++&gt;++++++++++++ &lt;&lt;&lt;&lt;&lt;
]
&gt;&gt; +++ .
&lt; ++ .
&gt;&gt;&gt; ++ .
&lt; +++++  .
&gt; ++++ .
&gt; + .
&lt;&lt;&lt;&lt; .
&gt;&gt;&gt; .
&lt; - .
--- .
&lt;&lt; .
&gt;&gt; + .
&gt; ----- .
.
--- .
&lt;&lt;&lt; + .