2003 mitsubishi eclipse

I have a 2003 eclipse that I just bought. When I get on the gas, the car makes a very loud noise at and past 4,000 rpm and lose power. I can let off the gas and let the car shift, it is fine until it gets to 4,000 rpm again.