The number 31587 (thirty-one thousand five hundred eighty-seven) is written in Roman numerals as follows: XXXIDLXXXVII