To test whether a number is polite consider its factors and the factors in the formula for the sum of the corresponding arithmetic progression.