Those are not viable codes there should be 4 digits after the P.
P5131 does not exist in my chart, the closest is for both upstream O2 sensors, I think I would spend the money and get the system live scanned just make sure your not chasing a grounding problem or a low or spike voltage.
Looking for a Used Grand Marquis in your area?
CarGurus has 1,542 nationwide Grand Marquis listings starting at $995.
Search Mercury Grand Marquis Questions
Mercury Grand Marquis Experts
Related Models For Sale