The number 51871 (fifty-one thousand eight hundred seventy-one) is written in Roman numerals as follows: LIDCCCLXXI