Let $n\geq 3$ and $E_n$ be the set of $n\times n$ matrices $A$ satisfying the $3$ following properties:
$\bullet$ its entries $(a_{i,j})$ are positive integers.
$\bullet$ the eigenvalues of $A$ are positive integers.
$\bullet$ $A$ is not diagonalizable over $\mathbb{Q}$.
We put $m_n=\min_{A\in E_n}\sum_{i,j}a_{i,j}$.
EDIT. Forgive me the changes in this question; I studied this problem a year ago in two different forms and I mix the programs I wrote at the time.
I can prove that follows
$\textbf{Lemma}$. Let $A=[a_{i,j}]\in E_n$. Then $\rho(A)\geq n$ and $tr(A)\geq 2n-1$.
$\textbf{Proof}$. As a positive matrix, $\rho(A)\geq \min_i\sum_ja_{i,j}$.
$\textbf{Proposition 1.}$ $\;m_n\leq n(n+2)$.
$\textbf{Proof}$. The idea is to consider the matrix $A=I_n+J_n$ where $J_n$ is the $n\times n$ matrix whose all the entries are $1$. $A$ satisfies the first $2$ conditions but not the third one. Thus we consider a perturbation of the lower part of $A$.
Let $n\geq 3$. We consider the $n\times n$ matrix $A=[a_{i,j}]$ where
if $i<n$, then $a_{i,i}=2$, and $a_{n,n}=3$;
the $(a_{i,j})$'s where $i\not= j$ are $1$ except $a_{n,n-1}=n$.
Then $spectrum(A)=\{n+2,1\text{ with multiplicity }n-1\}$.
Moreover
$(A-I_n)(A-(n+2)I_n)\not= 0$ because its $(1,1)$ entry is $-1$. $\square$
$\textbf{Proposition 2.}$ $\;m_3=15,m_4=24$.
$\textbf{Proof}$. i) for $n=3$, just browse the list of matrices such as $a_{i,j}\in\ {1,2,\cdots,6}$ and $\sum_{i,j}a_{i,j}\leq 14$. Then, we check that none of these matrices satisfies the $3$ above conditions. The time of calculation is $8"$.
ii) For $n=4$, let $A\in E_4$ realizing $m_4\leq 23$.
Step 1. If $\rho(A)=4$, then there are $i,j$ s.t. the $i^{th}$ row is $L_i=[1,\cdots,1]$ and (by transposition) the $j^{th}$ column is $C_j=[1,\cdots,1]^T$. Up to similarity by permutation, we may assume that $i=j=1$. We browse the list of such matrices s.t. the other $a_{i,j}$ are $\leq 8$ and $\sum_{i,j}a_{i,j}\leq 23$ and we proceed as in i) -the time of calculation is $2'$-. Thus $\rho(A)\geq 5$, $tr(A)\geq 8$ and $\sum_{i\not= j}a_{i,j}\leq 15$.
Step 2. Then, there are at least $9$ elements among the $\{a_{i,j};i\not= j\}$ that are $1$; therefore, there are a row $i$ and a column $j$ that have only 1's outside the diagonal. Up to similarity by permutation, we may assume that $i=j=1$. We browse the list of such matrices s.t. the other $a_{i,j}$ are $\leq 8$ and $\sum_{i,j}a_{i,j}\leq 23$ and we proceed as in i). -the time of calculation is $16'$-.
Now the new
$\textbf{Question}$. Is, for every $n\geq 5$, $m_n=n(n+2)$ true ?