Pseudocode for naive 3-partition finder: integer naive_3_partition_finder input: an positive integer n output: number of triples (a, b, c) such that a, b, and c are positive integers and a + b + c = n total = 0 for a in 1...n for b in 1...n for c in 1...n if a + b + c == n total += 1 return total