Problem

Source: Czech and Slovak Olympiad 2018, National Round, Problem 6

Tags: Combinatorial Number Theory, national olympiad, combinatorics, number theory



Determine the least positive integer $n$ with the following property – for every 3-coloring of numbers $1,2,\ldots,n$ there are two (different) numbers $a,b$ of the same color such that $|a-b|$ is a perfect square.