The number 17871 (seventeen thousand eight hundred seventy-one) is written in Roman numerals as follows: XVIIDCCCLXXI