Foreign investors have pumped in a little over Rs 51,200 crore into the Indian equity markets in August, making it the highest inflow in 20 months, amid improving risk sentiment and stabilisation in oil prices.