This is a simulation of two masses attached to the top and bottom ends of a vertical ideal spring. The top mass is initially held in place, while the weight of the bottom mass causes the initial stretch of the spring. When you press the "Run" button, the top mass is released and the resulting motion of the two masses and the spring is shown. The center of mass of the system falls downward with uniform gravitational acceleration relative to the ground, while the two masses each oscillate in simple harmonic motion relative to their center of mass.
The puzzle is this: under what conditions does the top mass actually move upwards relative to the ground during the first oscillation cycle?