OFFSET
1,2
COMMENTS
Usual Roman numeral representations are taken as ending at 3999 so that here n <= 2000.
a(21) = 18 is the first repeated element, and 21 is also the least positive integer not in this sequence, which has 1690 distinct terms. More exhaustively, the positive integers not in this sequence are 21 .. 39, 90 .. 100, 200 .. 236, 239 .. 399, 450 .. 484, 489, 900 .. 999, 1005 .. 1008, 1010 .. 1049, 1090 .. 1099, 2001 .. 2099, 2101 .. 2199, 2205 .. 2208, 2210 .. 2249, 2251 .. 2299 and 2400 .. oo (where a .. b means all integers from a to b). - M. F. Hasler, Aug 18 2025
LINKS
José Hernández, Table of n, a(n) for n = 1..2000
EXAMPLE
For n = 5, the 2n-1 list elements sorted by Roman numerals are I, II, III, IV, IX, V, VI, VII, VIII and the middle element is IX = 9 = a(5).
MATHEMATICA
Table[SortBy[Range[2*n-1], RomanNumeral][[n]], {n, 100}] (* Misha Lavrov via SeqFan *)
PROG
(Python)
import roman
def A387014(n):
return roman.fromRoman(sorted(roman.toRoman(k)for k in range(1, 2*n))[n-1]) # M. F. Hasler, Aug 18 2025
CROSSREFS
KEYWORD
base,fini,full,nonn
AUTHOR
José Hernández, Aug 13 2025
STATUS
approved
