in reply to Math with Perl, equation combinations:

The straightforward, structured way of doing this in Perl would have to be
perl -le'for$-(1..15){$==17-$--$_,print"$_+$-+$==17"for($-..16-$-)}'
This works because _+-==.

The `<samp>15</samp>' is just there to confuse your professor; it would work equally well with `<samp>289</samp>'.

Also note that by carefully arranging the columns so the second is increasing, the first going up and jumping down, and the last going down and jumping up, no duplicates are printed.