Implement a class PrimeNumbers that contains a method pairwisePrimes. The
method inputs an int (num) and returns the number of ways the number can be
written as the sum of three distinct integers that are pairwise relatively
prime; that is no pair of the three integers has a common factor greater than 1.
Note:
- num is greater than 0 and less than or equal to 40.
- One of the three distinct integer can be 1; Numbers are Pairwise Relatively
Prime if they share no factor GREATER than 1.
Method Signature:
public int pairwisePrimes( int );
Examples:
For num=8: 8 can be written as 1+2+5 and 1+3+4 and the method should return 2.
For num=18, the method should return 14 |