Is $H'(M) = 5M + 9H(M) \pmod{2^n}$ a secure hash function? theorem: For arbitrary $i≥0$ there exists $m,n≥0$ such that $35+i=5m+9n$.


We can use this theorem for constructing simple hash function. 

Let $M$ be message and $H(M)$ be its hashed value with hash function such as the $\text{SHA}256$. We construct new $n$ bit hash function $H'$ as follow:


  $H'(M)=5M+9H(M) \pmod {2^n}$


Is this hash function safe?

Edit: I want use this to compress $H$. So suppose that $n$ is smaller than bit size of $H$.
Consider

$$H(M)= 9^{-1} (E(M) - 5M) \pmod {2^n}$$

where $E$ is encryption using a random permutation with an efficiently computable inverse $D$. This is a secure hash for the same reason the  Matyas–Meyer–Oseas construction is.

Now using your definition of $H'$ we obtain:

$$H'(M)=5M+9H(M) = 5M + (E(M) - 5M) = E(M) \pmod {2^n}$$

Thus $M = D(H'(M))$ can be recovered and $H'$ is not a secure hash for all secure hashes $H(M)$.