Mod 31, the subsets of {0, 1, 3, 8, 12, 18} have differences 1 to 30 as follows. {{0,1},{1,3},{0,3},{8,12},{3,8},{12,18},{1,8},{0,8},{3,12},{8,18}, {1,12},{0,12},{18,0},{18,1},{3,18},{18,3},{1,18},{0,18},{12,0},{12,1}, {18,8},{12,3},{8,0},{8,1},{18,12},{8,3},{12,8},{3,0},{3,1},{1,0}} {0, 1, 3, 8, 12, 18} corresponds to perfect partition 1, 2, 5, 4, 6, 13 Seems my program for 8 marks was wrong, there are at least 6 solutions. 9 marks has at least 4 solutions. {{57, 8}, {0, 1, 3, 13, 32, 36, 43, 52}},{{57, 8}, {0, 1, 4, 9, 20, 22, 34, 51}},{{57, 8}, {0, 1, 4, 12, 14, 30, 37, 52}},{{57, 8}, {0, 1, 5, 7, 17, 35, 38, 49}},{{57, 8}, {0, 1, 5, 27, 34, 37, 43, 45}},{{57, 8}, {0, 1, 7, 19, 23, 44, 47, 49}},{{73, 9}, {0, 1, 3, 7, 15, 31, 36, 54, 63}},{{73, 9}, {0, 1, 5, 12, 18, 21, 49, 51, 59}},{{73, 9}, {0, 1, 7, 11, 35, 48, 51, 53, 65}},{{73, 9}, {0, 1, 12, 20, 26, 30, 33, 35, 57}}, I'm hoping to count how many distinct difference sets there are for each number of marks, up to maybe 98 marks.