Problem

Source: India TST 2018, D2 P1

Tags: number theory



For a natural number $k>1$, define $S_k$ to be the set of all triplets $(n,a,b)$ of natural numbers, with $n$ odd and $\gcd (a,b)=1$, such that $a+b=k$ and $n$ divides $a^n+b^n$. Find all values of $k$ for which $S_k$ is finite.