If the sum of n terms of an AP is given, where P and Q are constants then find the common difference.