Swapping numbers that sum to a perfect square
Source: BMO SL 2023 C2
May 3, 2024
combinatorics
Problem Statement
For an integer , the tuple is written on a blackboard. On each turn, one can choose two numbers from the tuple such that their sum is a perfect square and swap them to obtain a new tuple. Find all integers for which all permutations of can appear on the blackboard in this way.