Solution (source code)

= Solution

Assume $n\geq1$. With $u=(1,\ldots,1)^T$, the <all-ones matrix> satisfies $Av=(\sum_jv_j)u$. Hence \b[$n$ is an <eigenvalue>, and for $n\geq2$ the other <eigenvalue> is $0$]. At $n=1$ the <matrix> is $[1]$, so 1 is its only <eigenvalue>; zero is not an <eigenvalue> with a nonzero <eigenvector> in that case.