On the table there are k≥3 heaps of 1,2,…,k stones. In the first step, we choose any three of the heaps, merge them into a single new heap, and remove 1 stone from this new heap. Thereafter, in the i-th step (i≥2) we merge some three heaps containing more than i stones in total and remove i stones from the new heap. Assume that after a number of steps a single heap of p stones remains on the table. Show that the number p is a perfect square if and only if so are both 2k+2 and 3k+1. Find the least k with this property. greatest common divisornumber theory proposednumber theory