How can I use an n-dimension all-ones square matrix J to represent its power. J is a matrix described above, and I want to obtain $${ J }^{ 2 }, { J }^{ 3 },...,{ J }^{ n }$$I got some insights from the answer: What are the eigenvalues of matrix that have all elements equal 1? However, I still cannot figure out how to do it, although the characteristic equation is $${ \lambda  }^{ n }=n{ \lambda  }^{ n-1 }$$ and with the help of Cayley-Hamilton Theorem, I can get $${ J }^{ n }=nJ^{ n-1 }$$ But confused I cannot iterate J as: $${ J }^{ n }=n{ J }^{ n-1 }=n(n-1){ J }^{ n-2 }=...=n!{ J }^{  }$$Anyone can explain this?

$J^2 = n J,$ so $J^3 = n^2 J,$ in general $J^k = n^{k-1} J.$
