%I #16 Aug 09 2017 00:49:02
%S 1,5,11,15,20,40,51,55,60,90,102,104,106,109,111,115,120,140,151,155,
%T 160,190,201,205,210,250,300,401,405,410,450,502,504,506,509,511,515,
%U 520,540,551,555,560,590,601,605,610,650,700,901,905,910,950,1003,1007
%N Length of Roman notation for n = length of decimal representation.
%H Nathaniel Johnston, <a href="/A036787/b036787.txt">Table of n, a(n) for n = 1..144</a> (complete up to 3999)
%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[1100],StringLength[IntegerString[#,"Roman"]] == IntegerLength[ #]&] (* _Harvey P. Dale_, Jul 25 2011 *)
%o (Haskell)
%o a036787 n = a036787_list !! (n-1)
%o a036787_list = [x | x <- [1..], a006968 x == a055642 x]
%o -- _Reinhard Zumkeller_, Apr 20 2013
%o (PARI) is_A036787(n)=#Str(n)==#Str(A061493(n)) \\ _M. F. Hasler_, Jan 12 2015
%Y Cf. A036786, A036788.
%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