Pour a cup of baking soda followed by two cups of white vinegar down the pipe. Let it fizz for 15 minutes, then flush with a gallon of boiling water.
If your washer drains into a laundry tub, attach a mesh lint trap to the end of the hose. clogged drain in washing machine