Step 1: Use the trace property.
We know that
\[
\mathrm{Tr}(A^2-A)=\mathrm{Tr}(A^2)-\mathrm{Tr}(A)
\]
So first we calculate \(A^2\).
Given
\[
A=
\begin{bmatrix}
1 & 1 & 3\\
1 & 7 & 9\\
2 & 3 & 7
\end{bmatrix}
\]
Step 2: Compute \(A^2=A\cdot A\).
Multiplying the matrices,
\[
A^2=
\begin{bmatrix}
1 & 1 & 3\\
1 & 7 & 9\\
2 & 3 & 7
\end{bmatrix}
\begin{bmatrix}
1 & 1 & 3\\
1 & 7 & 9\\
2 & 3 & 7
\end{bmatrix}
\]
Now calculate the diagonal elements because only they are needed for trace.
First diagonal element:
\[
(1)(1)+(1)(1)+(3)(2)=1+1+6=8
\]
Second diagonal element:
\[
(1)(1)+(7)(7)+(9)(3)=1+49+27=77
\]
Third diagonal element:
\[
(2)(3)+(3)(9)+(7)(7)=6+27+49=82
\]
Therefore,
\[
\mathrm{Tr}(A^2)=8+77+82
\]
So,
\[
\mathrm{Tr}(A^2)=167
\]
Step 3: Find \(\mathrm{Tr}(A)\).
The trace of a matrix is the sum of its diagonal elements.
Hence,
\[
\mathrm{Tr}(A)=1+7+7
\]
Thus,
\[
\mathrm{Tr}(A)=15
\]
Step 4: Calculate \(\mathrm{Tr}(A^2-A)\).
Using
\[
\mathrm{Tr}(A^2-A)=\mathrm{Tr}(A^2)-\mathrm{Tr}(A),
\]
we get
\[
\mathrm{Tr}(A^2-A)=167-15
\]
Therefore,
\[
\mathrm{Tr}(A^2-A)=152
\]
Step 5: Final conclusion.
Hence,
\[
\boxed{152}
\]