If the sum of the first n natural numbers is a perfect square and n is less than 50, the possible values of n are :