Problem

Source: Kazakhstan MO 2018 final round.Grade 11;Problem 5

Tags: number theory, Kazakhstan



Given set $S = \{ xy\left( {x + y} \right)\; |\; x,y \in \mathbb{N}\}$.Let $a$ and $n$ natural numbers such that $a+2^k\in S$ for all $k=1,2,3,...,n$.Find the greatest value of $n$.