User blog comment:Fluoroantimonic Acid/Linar Array Notation in C/@comment-5529393-20150812180109

It looks like you have {b,p} = b^(2^p) rather than b^p.

Also, I don't see that you decrement the pilot anywhere.