For a matrix $M\in\mathbb{R}^{n\times n}_{\geq 0}$ with nonnegative entries, we define $m$ as the smallest positive integer such that all the entries of $M^m$ are strictly positive (if there is one).
What is, as a function of $n$, the maximum possible (finite) value of $m$ over all possible choices of $M$?
My attempt: By taking the matrix $M(i,i+1)=M(1,1)=M(1,n)=1$ else $M(i,j)=0$ I got $m=6,12,18$ for $n=4,7,10$. So it seems that $m=2n-2$?
I added the "probability" tag because Markov chain convergence was the motivation.