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.

User: Alain Cousquer

Alain Cousquer's wiki page.

Alain Cousquer has authored 2 sequences.

A356721 Numbers written using exactly two distinct Roman numerals.

Original entry on oeis.org

4, 6, 7, 8, 9, 11, 12, 13, 15, 19, 21, 22, 23, 25, 29, 31, 32, 33, 35, 39, 40, 51, 52, 53, 55, 60, 70, 80, 90, 101, 102, 103, 105, 110, 120, 130, 150, 190, 201, 202, 203, 205, 210, 220, 230, 250, 290, 301, 302, 303, 305, 310, 320, 330, 350, 390, 400, 501, 502
Offset: 1

Author

Keywords

Examples

			4, written IV, and 8, written VIII, are terms.
14, written XIV, is not a term.
		

Programs

  • Mathematica
    kmax=502; a={}; For[k=1, k<=kmax, k++, If[Length[DeleteDuplicates[Characters[RomanNumeral[k]]]] == 2, AppendTo[a,k]]]; a (* Stefano Spezia, Aug 26 2022 *)
  • Python
    def f(s, k):
        return s[:2] if k==4 else (s[1]*(k>=5)+s[0]*(k%5) if k<9 else s[0]+s[2])
    def roman(n):
        m, c, x, i = n//1000, (n%1000)//100, (n%100)//10, n%10
        return "M"*m + f("CDM", c) + f("XLC", x) + f("IVX", i)
    def ok(n): return len(set(roman(n))) == 2
    print([k for k in range(503) if ok(k)]) # Michael S. Branicky, Aug 24 2022

A356726 Integers which have in Roman numerals more distinct symbols than any smaller number.

Original entry on oeis.org

1, 4, 14, 44, 144, 444, 1444
Offset: 1

Author

Alain Cousquer, Aug 24 2022

Keywords

Comments

Indices of record highs in A057226.
Smallest number whose Roman notation has exactly n distinct symbols.
The sequence is finite because 1444 is the smallest number using the symbols I,V,X,L,C,D,M.

Examples

			For n = 3, a(3) = 14 because 14 = XIV which is the smallest number with 3 symbols in Roman notation.
		

Crossrefs

Programs

  • Mathematica
    kmax=1500; a={}; n=1; For[k=1, k<=kmax, k++, If[Length[DeleteDuplicates[Characters[RomanNumeral[k]]]] == n, AppendTo[a, k]; n++; k=1]]; a (* Stefano Spezia, Aug 26 2022 *)