Let $M$ be an integer matrix with determinant equal to one (or maybe also minus one, but I did not do any tests for this case) and assume that $M$ is periodic, that is $M^n$ is the identity matrix for some $n$. Let $p\_M$ denote the characteristic polynomial of $M$.



> 
> Question 1: Is it true that then $p\_M(1) \geq 0$ for periodic matrices $M$?
> 
> 
> 



> 
> Question 2: Let $a\_n$ be the largest period of a matrix in $Sl\_n(\mathbb{Z})$. What is $a\_n$? (or is there a good bound?)
> 
> 
> 


For $n=2$ it should be $a\_n=6$. Is $a\_n$ attained at a matrix with entries only in $\{-1,0,1\}$?



Sum of the coefficients of the characteristic polynomial of periodic matrices
**Q1:** This was already given in the comments, but: a matrix $M \in GL\_k(\mathbb{Z})$ of finite order $n$ must have [rational normal form](https://en.wikipedia.org/wiki/Frobenius_normal_form#A_rational_normal_form_generalizing_the_Jordan_normal_form) a block-diagonal matrix with blocks the [companion matrices](https://en.wikipedia.org/wiki/Companion_matrix) of cyclotomic polynomials $\Phi\_d$ for $d | n$, so the problem reduces to the case of a single such matrix, which is to say the problem reduces to asking whether we always have $\Phi\_d(1) \ge 0$. This is [true](https://en.wikipedia.org/wiki/Cyclotomic_polynomial#Polynomial_values), and in fact:



> 
> **Proposition:** $\Phi\_n(1)$ is equal to $p$ if $n = p^k$ is a prime power and equal to $1$ otherwise.
> 
> 
> 


*Proof.* $\Phi\_p(x) = \frac{x^p - 1}{x - 1}$ and $\Phi\_{p^k}(x) = \Phi\_p(x^{p^{k-1}})$ so the computation in the prime power case is clear. For a general $n$ we have that if $p \nmid m$ then


$$\Phi\_{pm}(x) = \frac{\Phi\_m(x^p)}{\Phi\_m(x)}$$


and hence that $\Phi\_n(1) = 1$ as soon as $n$ has more than one prime factor. $\Box$


**Q2:** As before it suffices to consider block sums of companion matrices of cyclotomic polynomials. A block sum of companion matrices of cyclotomic polynomials $\Phi\_{d\_i}(x)$ is an element of $GL\_n(\mathbb{Z})$ where $n = \sum \varphi(d\_i)$ of order $\text{lcm}(\{ d\_i \})$ so the problem is to optimize this (the cyclotomic polynomials satisfy $\Phi\_n(0) = 1$ for $n \ge 2$ so all these block matrices lie in $SL\_n(\mathbb{Z})$ also). This looks hard in general.


The corresponding problem of finding the largest order of an element of $S\_n$ is a similar optimization problem but where $n = \sum d\_i$. That sequence is [Landau's function](https://en.wikipedia.org/wiki/Landau%27s_function) ([A000793](http://oeis.org/A000793)) but I don't know if this one has a name or is in the OEIS.


**Edit #1:** If $L(n)$ denotes this largest order then we have


* $L(1) = 2$ ($1 = \varphi(2)$)
* $L(2) = 6$ ($2 = \varphi(6)$)
* $L(3) = 6$ ($3 = \varphi(6) + \varphi(2)$)
* $L(4) = 12$ ($4 = \varphi(6) + \varphi(4)$)
* $L(5) = 12$ ($5 = \varphi(6) + \varphi(4) + \varphi(2)$)
* $L(6) = 30$ ($6 = \varphi(10) + \varphi(6)$)


which, if I haven't messed up, already shows that this sequence is [not in the OEIS](http://oeis.org/search?q=1%2C+2%2C+6%2C+6%2C+12%2C+12%2C+30). On the other hand, it's not hard to see that $L(2k+1) = L(2k)$ for $k \ge 1$ since $\varphi(d)$ is even for $d \ge 2$ and $\varphi(2d) = \varphi(d)$ if $d$ is odd so it never helps us to add a $\varphi(2) = 1$ term to the sum. (We need to rule out the possibility that $L(n)$ is a power of $2$ but this shouldn't be hard.) So perhaps the OEIS has only the even terms $L(2n)$ somewhere; I haven't ruled that out yet.


An easy upper bound is that we can compute the exponent $E(n)$, namely the lcm of all orders of elements of finite order in $GL\_n(\mathbb{Z})$, so that $L(n) | E(n)$. By considering each prime separately we have that


$$\nu\_p(E(n)) = \text{max} \left\{ k : \varphi(p^k) = (p - 1) p^{k-1} \le n \right\} = \left\lfloor \log\_p \frac{n}{p-1} \right\rfloor + 1$$


and hence


$$E(n) = \prod\_p p^{ \left\lfloor \log\_p \frac{n}{p-1} \right\rfloor + 1}.$$


This sequence is much easier to compute although the bound becomes increasingly bad. It does have the virtue of also being a bound on the exponent of any finite subgroup of $GL\_n(\mathbb{Z})$. We again have $E(2k+1) = E(2k)$ for $k \ge 1$, and


* $E(1) = 1$
* $E(2) = E(3) = 6$
* $E(4) = E(5) = 2^3 \cdot 3 \cdot 5 = 120$
* $E(6) = E(7) = 2^3 \cdot 3^2 \cdot 5 \cdot 7 = 2520$


which also does not appear to be in the OEIS, with or without the terms doubled. The corresponding sequence for $S\_n$ is $\text{lcm}(1, 2, \dots n)$ which is [A003418](http://oeis.org/A003418) and the formula is similar except the exponent is more simply just $\lfloor \log\_p n \rfloor$.


**Edit #2:** Okay, I computed that $L(8) = 60$ which was finally enough terms for me to find it: $L(2n)$ appears to be (up to some indexing issues) [A005417](http://oeis.org/A005417) on the OEIS. A comment there suggests the following argument which makes $L$ a bit easier to compute than I had been thinking: if $\gcd(n, m) = 1$ and $\varphi(n), \varphi(m) \ge 2$ (so neither $m$ nor $n$ is equal to $2$) then we can always replace a $\Phi\_{mn}(x)$ block with a $\Phi\_n(x)$ block and a $\Phi\_m(x)$ block, since $\varphi(mn) = \varphi(m) \varphi(n) \ge \varphi(m) + \varphi(n)$. So we only ever need to consider $\Phi\_d(x)$ blocks where $d$ is a prime power or twice an odd prime power. A similar argument works in $S\_n$. It follows (this is the OEIS comment) that


$$L(n) = \text{max} \left\{ \prod p\_i^{e\_i} : \sum (p\_i - 1) p\_i^{e\_i - 1} \le n \right\}.$$


**Edit #3:** The observation in the previous paragraph answers **Q3:** yes, the maximum is attained for a matrix with entries in $\{ -1, 0, 1 \}$, since the same is known about the cyclotomic polynomials $\Phi\_d(x)$ where $d$ is a prime power or twice an odd prime power. Famously the cyclotomic polynomials are known to not always have coefficients in $\{ -1, 0, 1 \}$ and $\Phi\_{105}(x)$ is the smallest counterexample, but that doesn't matter here.


**Edit #4:** Okay, here are some bounds. For a lower bound we clearly have $g(n) \le L(n)$. For an upper bound let $r\_i = (p\_i - 1) p\_i^{e\_i - 1}$, so that we can write the optimization problem defining $L(n)$ as


$$L(n) = \text{max}\left\{\prod \frac{p\_i}{p\_i - 1} r\_i : \sum r\_i \le n \right\}.$$


We can bound this factor $\prod \frac{p\_i}{p\_i - 1}$ as follows. The primes occurring in this product are at worst the primes up to $n+1$, and I believe the asymptotic behavior of $\prod\_{p\_i \le n+1} \frac{p\_i}{p\_i - 1}$ should be $\log n$ but I don't see an extremely clean proof so I'll settle for the worse bound


$$\prod\_{p\_i \le n+1} \frac{p\_i}{p\_i - 1} \le \prod\_{k=2}^{n+1} \frac{k}{k-1} = n+1$$


which gives


$$L(n) \le \text{max} \left\{ (n+1) \prod r\_i : \sum r\_i \le n \right\}.$$


We can now relax this optimization problem so that the $r\_i$ can take real values, and then a standard Lagrange multiplier argument shows that, for any number $k$ of terms (which we've left unspecified), we want to take $r\_i = r$ for some fixed $r$. This gives


$$L(n) \le \text{max} \left\{ (n+1) r^k : kr \le n, k \in \mathbb{N}, r \in \mathbb{R} \right\}$$


and if we further relax $k$ to a real number then a standard calculus argument gives $r = e, k = \frac{n}{e}$, so


$$\boxed{ L(n) \le (n+1) \exp \left( \frac{n}{e} \right) }$$


exactly paralleling the analogous but slightly simpler argument for Landau's function which gives $g(n) \le \exp \left( \frac{n}{e} \right)$. I would guess that in fact like $g(n)$ we should also have $\log L(n) \sim \sqrt{n \log n}$. I think the starting point is that the relaxation we used above is very inaccurate for large primes and for $p$ such that $(p-1)p > n$ the corresponding exponent is at most $1$.


