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.

A120433 Numbers whose Roman numeral representation uses the subtractive notation.

This page as a plain text file.
%I A120433 #38 Jan 14 2025 16:01:52
%S A120433 4,9,14,19,24,29,34,39,40,41,42,43,44,45,46,47,48,49,54,59,64,69,74,
%T A120433 79,84,89,90,91,92,93,94,95,96,97,98,99,104,109,114,119,124,129,134,
%U A120433 139,140,141,142,143,144,145,146,147,148,149,154,159,164,169,174
%N A120433 Numbers whose Roman numeral representation uses the subtractive notation.
%C A120433 Each number in this sequence has a 4 or a 9 in its decimal representation, corresponding to one of IV, IX, XL, XC, CD, CM. - _Alonso del Arte_, Jan 05 2018
%H A120433 Nathaniel Johnston, <a href="/A120433/b120433.txt">Table of n, a(n) for n = 1..1952</a> (complete up to 3999)
%e A120433 In Roman numerals, 14 is XIV, that is, X + (V - I) = 10 + (5 - 1) = 14, so 14 is in the sequence.
%e A120433 In Roman numerals, 15 is XV, meaning X + V = 10 + 5 = 15, which does not use subtractive notation, so 15 is not in the sequence.
%p A120433 with(StringTools): for n from 1 to 300 do r:=convert(n,roman): if(Search("IV",r)>0 or Search("IX",r)>0 or Search("XL",r)>0 or Search("XC",r)>0 or Search("CD",r)>0 or Search("CM",r)>0)then printf("%d, ", n): fi: od: # _Nathaniel Johnston_, May 18 2011
%t A120433 Select[Range[3999], StringContainsQ[RomanNumeral[#], {"IV", "IX", "XL", "XC", "CD", "CM"}] &] (* _Michael De Vlieger_, Aug 20 2024 *)
%o A120433 (Python)
%o A120433 def ok(n): return {"4", "9"} & set(str(n))
%o A120433 afull = [k for k in range(4000) if ok(k)] # _Michael S. Branicky_, Aug 20 2024
%Y A120433 Cf. A061493.
%Y A120433 Cf. A016897, 5n + 4 (first diverges after 39, as that sequence does not include 40, 41, 42, 43).
%K A120433 base,nonn
%O A120433 1,1
%A A120433 _Christian Amet_, Jul 13 2006