The number 31540 (thirty-one thousand five hundred forty) is written in Roman numerals as follows: XXXIDXL