Problem

Source: Dutch NMO 2020 p5

Tags: combinatorics, number theory, Perfect Squares



Sabine has a very large collection of shells. She decides to give part of her collection to her sister. On the first day, she lines up all her shells. She takes the shells that are in a position that is a perfect square (the first, fourth, ninth, sixteenth, etc. shell), and gives them to her sister. On the second day, she lines up her remaining shells. Again, she takes the shells that are in a position that is a perfect square, and gives them to her sister. She repeats this process every day. The $27$th day is the first day that she ends up with fewer than $1000$ shells. The $28$th day she ends up with a number of shells that is a perfect square for the tenth time. What are the possible numbers of shells that Sabine could have had in the very beginning?