Far from being a trial and error problem, this can be solved logically.
+-----+-----+-----+-----+-----+-----+-----+-----+ | 01 | 16 | 05 | 20 | 25 | 09 | 21 | 01 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 18 | 10 | 27 | 26 | 11 | 17 | 12 | 32 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 32 | 11 | 15 | 19 | 08 | 06 | 27 | 20 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 17 | 04 | 13 | 24 | 30 | 28 | 31 | 02 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 25 | 10 | 02 | 26 | 04 | 28 | 22 | 13 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 05 | 14 | 30 | 08 | 15 | 31 | 19 | 06 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 23 | 07 | 24 | 16 | 29 | 22 | 18 | 19 | +-----+-----+-----+-----+-----+-----+-----+-----+ | 03 | 12 | 09 | 03 | 07 | 14 | 23 | 33 | +-----+-----+-----+-----+-----+-----+-----+-----+