MathDB
good positive integers - Portugal OPM 2020 p1

Source:

May 15, 2024
number theory

Problem Statement

It is said that a positive integer is not GOOD, if there exists a permutation of the integers from 1 to n, (a1,a2,...,an)(a_1,a_2,...,a_n) such that k+akk + a_k is a perfect square for all kk. For example 55 is a GOOD number, since the permutation (3,2,1,5,4)(3,2,1,5,4) checks the condition: 1+3=221 + 3 = 2^2, 2+2=222 + 2 = 2^2, 3+1=223 + 1 = 2^2; 4+5=324 + 5 = 3^2 and 5+4=325 +4 = 3^2. Find all GOOD numbers up to 1212.