Brute force test for Math Stack Exchange question 612346: http://math.stackexchange.com/questions/612346