# [Python 2], 81 bytes <!-- language-all: lang-python --> f=lambda n,i=1,*l:i/n*[l]or sum([f(n,i+1,x,*l)for x in range(n)if x*i%n==n/2],[]) [Try it online!][TIO-jda0baob] [Python 2]: https://docs.python.org/2/ [TIO-jda0baob]: https://tio.run/##RY3BCsMgEETP@hVeSly7ECL0EvBLrAdLY7tgNsGkkH69tb30NDDvMbO@9@fCttbkcpxv96gYyQ1o8kg9G5/DUtT2mrVPupHzgEdjkFp7KGJVIj8mzUBJHYZO7Bz3NqAPUL8O/Z0LjFKws8aQFMW1OZBiLcR7u8wT6wLYXbnD8ov6AQ "Python 2 – Try It Online" ---- # [Python 2], 92 bytes <!-- language-all: lang-python --> f=lambda n,c=1:[x+[c*y]+z for y in range(1,n,2)for x in f(n/2,c*2)for z in f(n/2,c*2)]or[[]] [Try it online!][TIO-jd9yhsqz] [Python 2]: https://docs.python.org/2/ [TIO-jd9yhsqz]: https://tio.run/##Vc1BCsMgEAXQtZ7CXdQIJUI3AU9iXFgbWyEdw5BFzOVtbBelq4H3P3/Wsj0z6FqjWfzrdvcMVDDDaPfeBllcf7CYkRWWgKGHx8wHBUqLhnvDyOGiVZBfOv7JZbTWudqi9Ju4ipESMFrKRAmasy8oWTHBdn5fZuAoVDdBp/Bz6hs "Python 2 – Try It Online"