The number 40584 (forty thousand five hundred eighty-four) is written in Roman numerals as follows: XLDLXXXIV