#Pyth, <del>34</del> <del>33</del> 31 Basically a translation of [xnor](http://codegolf.stackexchange.com/users/20260/xnor)'s [Python answer](http://codegolf.stackexchange.com/a/47480/30164). I'm still not great with Pyth, so improvement suggestions are welcome. Defines a function `y` to return a list of lists of integers. L?]]1<b2smm++*kd]b*k_dy-b1[1_1) Explanation: L define a function y with argument b that returns ?*]]1<b2 [[1]] if b < 2 else s sum( m map(lambda d: m map(lambda k: ++*kd]b*k_d k*d + [b] + k*-d y-b1 , y(b - 1)) [1_1) , [1, -1])