The number 21787 (twenty-one thousand seven hundred eighty-seven) is written in Roman numerals as follows: XXIDCCLXXXVII