cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A160676 Numbers k such that k and 2k use the same number of characters when expressed in Roman numerals.

This page as a plain text file.
%I A160676 #16 Feb 16 2025 08:33:10
%S A160676 2,5,7,13,18,20,22,31,36,46,50,52,55,57,63,68,70,72,81,86,95,97,103,
%T A160676 108,123,126,130,132,135,137,145,147,153,158,173,176,180,182,185,187,
%U A160676 198,200,202,205,207,213,218,220,222,231,236,246,254,261,266,274
%N A160676 Numbers k such that k and 2k use the same number of characters when expressed in Roman numerals.
%C A160676 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 A160676 Nathaniel Johnston, <a href="/A160676/b160676.txt">Table of n, a(n) for n = 1..503</a> (complete up to 3999)
%H A160676 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RomanNumerals.html">Roman Numerals</a>
%H A160676 Wikipedia, <a href="http://en.wikipedia.org/wiki/Roman_numerals">Roman numerals</a>
%F A160676 {n: A006968(n) = A006968(2n)}. - _Jonathan Vos Post_, May 24 2009
%p A160676 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 A160676 Select[Range[300],StringLength[RomanNumeral[#]]==StringLength[ RomanNumeral[ 2 #]]&] (* _Harvey P. Dale_, Apr 29 2022 *)
%o A160676 (Haskell)
%o A160676 a160676 n = a160676_list !! (n-1)
%o A160676 a160676_list = filter (\x -> a006968 x == a006968 (2 * x)) [1..]
%o A160676 -- _Reinhard Zumkeller_, Apr 14 2013
%Y A160676 Cf. A006968. - _Jonathan Vos Post_, May 24 2009
%K A160676 nonn,easy,base
%O A160676 1,1
%A A160676 _Claudio Meller_, May 23 2009