\(M=3^0+3^1+3^2+...+3^{2023}\)
\(=\left(1+3+3^2+3^3\right)+\left(3^4+3^5+3^6+3^7\right)+...+\left(3^{2020}+3^{2021}+3^{2022}+3^{2023}\right)\)
\(=40+3^4\left(1+3+3^2+3^3\right)+...+3^{2020}\left(1+3+3^2+3^3\right)\)
\(=40+3^4\cdot40+...+3^{2020}\cdot40\)
\(=40\left(1+3^4+...+3^{2020}\right)\)
\(=20\cdot2\left(1+3^4+...+3^{2020}\right)⋮20\)