The number 3171 (three thousand one hundred seventy-one) is written in Roman numerals as follows: MMMCLXXI