<p><span class="h-card" translate="no"><a href="https://mastodon.social/@regehr" class="u-url mention">@<span>regehr</span></a></span> if you disassemble the program, the actual loop is pretty dead simple, and in particular has a very easy to characterize dependency on A, which lets you construct a solution pretty directly.</p><p>In particular, the only loop-carried dependency is on A, so you just need to run the loop backwards to build the desired A up.</p>