The number 21842 (twenty-one thousand eight hundred forty-two) is written in Roman numerals as follows: XXIDCCCXLII