Problems(1)
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) such that k+ak is a perfect square for all k. For example 5 is a GOOD number, since the permutation (3,2,1,5,4) checks the condition: 1+3=22, 2+2=22, 3+1=22; 4+5=32 and 5+4=32. Find all GOOD numbers up to 12. number theory