I don't know if this question is considered research-related. If not, I will move it to Math SE.

I am searching for matrices with the property

$$|A|_F^2 = \deg( \chi_A(t) ) = 2 \deg( m_A(t)), tr(A) = 1$$

where $\chi_A(t)$ is the characteristic polynomial and $m_A(t)$ is the minimal polynomial and $|.|_F$ is the Frobenius norm. For some $n \in \mathbb{N}$, I have already found a matrix $A_n$ with this property, but now I am asking myself how to construct or find other matrices with this property.

The matrix $A_n$ for a natural number $n$ is defined as $A_n = \oplus_{d|n} Z_d$ where $Z_d$ is a circulant matrix with $0/1$ which is defined on Wikipedia as $Z$. I can show that

$$\chi_A(t) = \prod_{d|n}{t^d-1}=\prod_{d|n} \phi_d(t)^{f_n(d)}$$

Hence one can conclude from this that:

$$\sigma(n) = \deg(\chi_A(t)) = \sum_{d|n} {f_n(d) \phi(d)}$$

where $\phi$ is the Euler phi function. The minimal polynomial of $A_n$ is $m_A(t) = t^n-1$. For $f_n(d)$ I make the conjecture that: $$f_n(d) = (a_1-k_1+1)\cdots(a_r-k_r+1)$$ where $n = p_1^{a_1}\cdots p_r^{a_r}$ is the prime decomposition of $n$ and $d= p_1^{k_1}\cdots p_r^{k_r}$ with $0 \le k_i \le a_i$ is a divisor of $n$. It is clear that $|A_n|_F ^2 = \sigma(n)$ If $n$ is a perfect number we have

$$|A_n|_F^2 = \deg( \chi_{A_n}(t) ) = 2 \deg( m_{A_n}(t))$$

that is why I am searching for other matrices $A$ with this property and $tr(A)=1$ since we always have $tr(A_n)=1$. Maybe this can shed some light on how difficult it is to have this property. Also if somebody has an idea on how to prove the conjecture for $f_n(d)$ that would also be fine.