Partition3gr function

Computes (N-1)*(N-2) possible partitions of N into 3 subsets.