%I #15 Apr 29 2022 19:32:33
%S 2,5,7,13,18,20,22,31,36,46,50,52,55,57,63,68,70,72,81,86,95,97,103,
%T 108,123,126,130,132,135,137,145,147,153,158,173,176,180,182,185,187,
%U 198,200,202,205,207,213,218,220,222,231,236,246,254,261,266,274
%N Numbers k such that k and 2k use the same number of characters when expressed in Roman numerals.
%C Example: 2 and its double 4 both need two characters in Roman numerals: 2=II, 4=IV. Also 5=V, 10=X; 7=VII, 14=XIV.
%H Nathaniel Johnston, <a href="/A160676/b160676.txt">Table of n, a(n) for n = 1..503</a> (complete up to 3999)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RomanNumerals.html">Roman Numerals</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Roman_numerals">Roman numerals</a>
%F {n: A006968(n) = A006968(2n)}. - _Jonathan Vos Post_, May 24 2009
%p for n from 1 to 3999 do if(length(convert(n, roman)) = length(convert(2*n, roman)))then printf("%d, ", n): fi: od: # _Nathaniel Johnston_, May 18 2011
%t Select[Range[300],StringLength[RomanNumeral[#]]==StringLength[ RomanNumeral[ 2 #]]&] (* _Harvey P. Dale_, Apr 29 2022 *)
%o (Haskell)
%o a160676 n = a160676_list !! (n-1)
%o a160676_list = filter (\x -> a006968 x == a006968 (2 * x)) [1..]
%o -- _Reinhard Zumkeller_, Apr 14 2013
%Y Cf. A006968. - _Jonathan Vos Post_, May 24 2009
%K nonn,easy,base
%O 1,1
%A _Claudio Meller_, May 23 2009
|