%I #17 Aug 09 2017 00:16:59
%S 1,5,10,11,15,20,40,50,51,55,60,90,100,101,102,104,105,106,109,110,
%T 111,115,120,140,150,151,155,160,190,200,201,205,210,250,300,400,401,
%U 405,410,450,500,501,502,504,505,506,509,510,511,515,520,540,550,551,555
%N Length of Roman notation for n <= length of decimal representation.
%C The Roman numeration system used here is the naive one taught in primary school. This sequence, like many others involving numeration systems, is neither well-defined nor interesting for large values of n. - _N. J. A. Sloane_, Jul 03 2008
%H Nathaniel Johnston, <a href="/A036788/b036788.txt">Table of n, a(n) for n = 1..199</a> (complete up to 3999)
%H Paul Lewis, <a href="http://www.web40571.clarahost.co.uk/roman/howtheywork.htm">Roman numerals</a>
%F A006968(a(n)) <= A055642(a(n)). - _Reinhard Zumkeller_, Apr 20 2013
%e 15 = XV has length 2 in both notations.
%p for n from 1 to 3999 do if(length(convert(n, roman)) <= length(n))then printf("%d, ", n): fi: od: # _Nathaniel Johnston_, May 18 2011
%t Select[Range[560],StringLength[IntegerString[#,"Roman"]]<= IntegerLength[ #]&] (* _Harvey P. Dale_, Dec 18 2011 *)
%o (Haskell)
%o a036788 n = a036788_list !! (n-1)
%o a036788_list = [x | x <- [1..], a006968 x <= a055642 x]
%o -- _Reinhard Zumkeller_, Apr 20 2013
%Y Cf. A036786, A036787, A105269, A119310, A121305.
%K nonn,base,easy,nice
%O 1,2
%A _N. J. A. Sloane_
%E Corrected and extended by Larry Reeves (larryr(AT)acm.org), Sep 25 2000