Well, it would take 4 changes of 15gallons (20%) to get your nitrates down to 16 (.8X.8X.8X.8X40). Larger changes would do it more quickly, but then I'd worry a little more about stability.
4 50% changes would get you down to 2.5, but I don't know that that's feasible.
All of this assumes that you're tank is not actively making nitrates (overstocking, overfeeding, etc.)
If your nitrates are at 40 and you decided to do 4 water changes in every 4 days your nitrates would be as follows.
1st water change 20% (15 gallons) trates would be 32
2nd water change 20% (15 gallons) trates would be 25.6
3rd water change 20% (15 gallons) trates would be 20.48
4th water change 20% (15 gallons) trates would be 16.384
remember when you do a water change you are taking 20% of the old water.