Problem

Source: Brazil Cono Sur TST 2023 - T1/P2

Tags: number theory



Define $d(n)$ as the number of positive divisors of $n\in\mathbb{Z_+^*}$. Let $a$ and $b$ be positive integers satisfying the equality $$a + d(a) = b^2 + 2$$Prove that $a+b$ is even.