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.

Previous Showing 11-20 of 46 results. Next

A036742 Numbers <= 3999 sorted in Roman numeral lexicographic order.

Original entry on oeis.org

100, 200, 300, 301, 302, 303, 304, 309, 350, 351, 352, 353, 354, 359, 355, 356, 357, 358, 360, 361, 362, 363, 364, 369, 365, 366, 367, 368, 370, 371, 372, 373, 374, 379, 375, 376, 377, 378, 380, 381, 382, 383, 384, 389, 385, 386, 387, 388, 305, 306, 307
Offset: 1

Views

Author

Keywords

Comments

Beyond 3999 the numerals are not representable in ASCII and hence sorting becomes problematic. - Steven N. Severinghaus, Nov 17 2007

Crossrefs

Programs

  • Maple
    A036742 := sort([seq(convert(n, roman), n=1..3999)], lexorder): seq(convert(A036742[n], arabic), n=1..51); # Nathaniel Johnston, May 18 2011
  • Mathematica
    FromRomanNumeral[Sort[RomanNumeral[Range[3999]]]] (* Hans Havermann, May 06 2019; requires Mathematica 10.2+ *)
  • Perl
    #!/bin/bash
    # Requires Roman module:
    # http://search.cpan.org/~chorny/Roman-1.20/lib/Roman.pm
    perl -e 'use Roman; for(1..3999) { print roman($_)."
    "; }' | sort | perl -ne 'use Roman; chomp; print arabic($_)."
    "'
    # Steven N. Severinghaus, Nov 17 2007
    
  • Python
    import roman
    A36742=sorted(range(1,4000), key=roman.toRoman)
    def A036742(n): return A36742[n-1] # M. F. Hasler, Aug 16 2025

A280913 Number of dots in International Morse numeral representation of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2
Offset: 0

Views

Author

Indranil Ghosh, Jan 10 2017

Keywords

Comments

The Morse Code is written in current ITU standard.
For the number of dashes see A280916.

Examples

			For n = 4, the Morse numeral representation of 4 is "....-" i.e., 4 dots. So, a(4) = 4.
For n = 26, the Morse numeral representation of 26 is "..--- -...." i.e, 6 dots. So, a(26) = 6.
		

Crossrefs

Cf. A060109 (Morse code for n), A280916 (number of dashes), A268643 (number of '1's in n).

Programs

  • Mathematica
    Table[Total[IntegerDigits[n]/.{6->4,7->3,8->2,9->1}],{n,0,120}] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    apply( {A280913(n)=if(n>9,self()(n\10)+self()(n%10), 5-abs(n-5))}, [0..88]) \\ M. F. Hasler, Jun 22 2020
  • Python
    M={"1":".----","2":"..---","3":"...--","4":"....-","5":".....","6":"-....","7":"--...","8":"---..","9":"----.","0":"-----"}
    def A280913(n):
        z="".join(M[i] for i in str(n))
        return z.count(".")
    print([A280913(n) for n in range(101)])
    

Formula

a(n) = A268643(A060109(n)) = floor(1+n/10)*5 - A280916(n) = a(floor(n/10)) + a(n%10) if n > 9 or min(n, 10-n) = 5 - |5 - n| otherwise, where % is the modulo (remainder) operator. - M. F. Hasler, Jun 22 2020

A280916 Number of dashes in International Morse numeral representation of n.

Original entry on oeis.org

5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 8, 7, 6, 5, 4, 3, 4, 5, 6, 7, 9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 14
Offset: 0

Views

Author

Indranil Ghosh, Jan 10 2017

Keywords

Comments

The Morse Code is written in current ITU standard.

Examples

			For n = 4, the Morse numeral representation of 4 is "....-" i.e., 1 dash. So, a(4) = 1.
For n = 26, the Morse numeral representation of 26 is "..--- -...." i.e, 4 dashes. So, a(26) = 4.
		

Crossrefs

Cf. A060109 (Morse code of n), A280913 (number of dots).
Cf. A006968, A278182 (for Roman resp. Maya representation of n).

Programs

  • Mathematica
    Array[Total@ Map[Abs[# - 5] &, IntegerDigits[#]] &, 101, 0] (* Michael De Vlieger, Jun 28 2020 *)
  • PARI
    apply( {A280916(n)=if(n>9, self()(n\10)+self()(n%10), abs(n-5))}, [0..88]) \\ M. F. Hasler, Jun 22 2020
  • Python
    M={"1":".----","2":"..---","3":"...--","4":"....-","5":".....","6":"-....","7":"--...","8":"---..","9":"----.","0":"-----"}
    def A280916(n):
        z="".join(M[i] for i in str(n))
        return z.count("-")
    print([A280916(n) for n in range(100)])
    

Formula

a(n) = A316863(A060109(n)) = floor(1+n/10)*5 - A280913(n) = a(floor(n/10)) + a(n%10) if n > 9 or |5 - n| otherwise, where % is the modulo (remainder) operator. - M. F. Hasler, Jun 22 2020

A093783 Sum of digits of n in Roman numeral representation.

Original entry on oeis.org

1, 2, 3, 6, 5, 6, 7, 8, 11, 10, 11, 12, 13, 16, 15, 16, 17, 18, 21, 20, 21, 22, 23, 26, 25, 26, 27, 28, 31, 30, 31, 32, 33, 36, 35, 36, 37, 38, 41, 60, 61, 62, 63, 66, 65, 66, 67, 68, 71, 50, 51, 52, 53, 56, 55, 56, 57, 58, 61, 60, 61, 62, 63, 66, 65, 66, 67, 68
Offset: 1

Views

Author

Reinhard Zumkeller, May 17 2004

Keywords

Examples

			n=42 == XLII: a(42) = 'X' + 'L' + 'I' + 'I' = 10+50+1+1 = 62.
		

Crossrefs

Programs

  • Haskell
    a093783 n = q 0 $ a061493 n where
         q s 0 = s
         q s x = q (s + [0,1,5,10,50,100,500,1000] !! d') x'
                 where  (x',d) = divMod x 10; d' = fromInteger d
    -- Reinhard Zumkeller, Apr 14 2013
    (HP 49G calculator)
    ::
      CK1&Dispatch
      # FF
      ::
        FPTR2 ^DupQIsZero?
        caseSIZEERR
        FPTR2 ^Z>S
        Z0_
        SWAP
        DUPLEN$
        ZERO_DO
        DUP
        ISTOP-INDEX
        SUB$1#
        BINT48
        #-
        BINT4
        OVER#=
        OVER
        BINT9
        #=
        OR
        IT
        #2+
        FPTR2 ^#>Z
        Z10_
        INDEX@
        FPTR2 ^RP#
        FPTR2 ^RMULText
        ROT
        FPTR2 ^RADDext
        SWAPLOOP
        DROP
      ;
    ;
    Gerald Hillier, Sep 08 2015
  • Maple
    A093783 := proc(n) local r: r:=convert(n, roman): return add(convert(r[j], arabic), j=1..length(r)): end: seq(A093783(n), n=1..68); # Nathaniel Johnston, May 18 2011
  • Mathematica
    Total[#2 FromRomanNumeral[#1] & @@@ Tally[Characters@ RomanNumeral@ #]] & /@ Range@ 68 (* Michael De Vlieger, Sep 08 2015, Version 10.2 *)

A105447 Positive integers whose representation as Roman Fibonacci numbers has exactly two symbols.

Original entry on oeis.org

4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 29, 31, 32, 33, 35, 36, 37, 39, 42, 47, 50, 52, 53, 54, 56, 57, 58, 60, 63, 68, 76, 81, 84, 86, 87, 88, 90, 91, 92, 94, 97, 102, 110, 123, 131, 139, 141, 142, 143, 145, 146, 147, 149, 152, 157
Offset: 1

Views

Author

Jonathan Vos Post, Apr 09 2005

Keywords

Examples

			In Roman Fibonacci number representation:
4 = "22", 6 = "33", 7 = "52", 9 = "81", 10 = "55", 11 = "83", 12 = "1A",
14 = "A1", 15 = "A2", 16 = "88", 18 = "3B", 19 = "2B", 20 = "1B", ...
143 = "1F", 145 = "F1", 146 = "F2", 147 = "F3", 149 = "F5", 152 = "F8".
		

Crossrefs

Formula

a(n) is an element of A105447 iff A105446(n) = 2. a(n) is the sum or difference of two Fibonacci numbers A000045 and a(n) is not itself a Fibonacci number A000045.

A105448 Positive integers whose representation as Roman Fibonacci numbers has exactly three symbols.

Original entry on oeis.org

17, 25, 27, 28, 30, 38, 40, 41, 43, 44, 45, 46, 48, 49, 51, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 82, 83, 85, 93, 95, 96, 98, 99, 100, 101, 103, 104, 105, 107, 108, 109, 111, 112, 113, 115, 118, 124, 125, 126, 128, 132, 133, 134, 136, 140
Offset: 1

Views

Author

Jonathan Vos Post, Apr 09 2005

Keywords

Comments

A105446 gives the number of symbols in Roman Fibonacci numbers. A105447 gives positive integers whose representation as Roman Fibonacci numbers has exactly two symbols. A105449 gives positive integers whose representation as Roman Fibonacci numbers has exactly four symbols. A105450 gives positive integers whose representation as Roman Fibonacci numbers has exactly five symbols.

Examples

			In Roman Fibonacci number representation:
17 = "A22", 25 = "B22", 27 = "AA1", 28 = "AA2", 30 = "B81", 38 = "C22", 40 = "C33", 41 = "C52", 43 = "BB1", 44 = "BB2", 45 = "BB3", 46 = "1CA", 48 = "CA1", ..., 155 = "2FA", 156 = "1FA", 158 = "FA1", 159 = "FA2", 160 = "FA3".
		

Crossrefs

Formula

a(n) is an element of A105447 iff A105446(n) = 3.

A105449 Positive integers whose representation as Roman Fibonacci numbers has exactly four symbols.

Original entry on oeis.org

80, 106, 114, 116, 117, 119, 120, 121, 122, 127, 129, 130, 135, 137, 138
Offset: 1

Views

Author

Jonathan Vos Post, Apr 09 2005

Keywords

Comments

A105446 gives the number of symbols in Roman Fibonacci numbers. A105447 gives positive integers whose representation as Roman Fibonacci numbers has exactly two symbols. A105448 gives positive integers whose representation as Roman Fibonacci numbers has exactly three symbols. A105450 gives positive integers whose representation as Roman Fibonacci numbers has exactly five symbols.

Examples

			In Roman Fibonacci number representation:
80 = "DB22", 106 = "EA22", 114 = "DD22", 116 = "DD33", 117 = "DD52", 119 = "DD81", 120 = "DD55", 121 = "DD2A", 122 = "DD1A", 127 = "BF22", 129 = "BF33", 130 = "BF52", 135 = "AF22", 137 = "AF33", 138 = "AF52".
		

Crossrefs

Formula

a(n) is an element of A105449 iff A105446(n) = 4.

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

Original entry on oeis.org

2, 5, 7, 13, 18, 20, 22, 31, 36, 46, 50, 52, 55, 57, 63, 68, 70, 72, 81, 86, 95, 97, 103, 108, 123, 126, 130, 132, 135, 137, 145, 147, 153, 158, 173, 176, 180, 182, 185, 187, 198, 200, 202, 205, 207, 213, 218, 220, 222, 231, 236, 246, 254, 261, 266, 274
Offset: 1

Views

Author

Claudio Meller, May 23 2009

Keywords

Comments

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.

Crossrefs

Cf. A006968. - Jonathan Vos Post, May 24 2009

Programs

  • Haskell
    a160676 n = a160676_list !! (n-1)
    a160676_list = filter (\x -> a006968 x == a006968 (2 * x)) [1..]
    -- Reinhard Zumkeller, Apr 14 2013
  • Maple
    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
  • Mathematica
    Select[Range[300],StringLength[RomanNumeral[#]]==StringLength[ RomanNumeral[ 2 #]]&] (* Harvey P. Dale, Apr 29 2022 *)

Formula

{n: A006968(n) = A006968(2n)}. - Jonathan Vos Post, May 24 2009

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

Original entry on oeis.org

2, 7, 20, 22, 36, 70, 72, 97, 153, 200, 202, 207, 220, 222, 236, 315, 351, 360, 362, 379, 448, 653, 700, 702, 707, 720, 722, 736, 871, 970, 972, 997, 1035, 1087, 1177, 1235, 1267, 1350, 1352, 1357, 1386, 1537, 1677, 1735, 1767, 1818, 1836, 1870, 1872, 1897
Offset: 1

Views

Author

Claudio Meller, May 23 2009, May 24 2009

Keywords

Comments

2 = II, 4 = IV, 6 = VI;
7 = VII, 14 = XIV, 21 = XXI;
20 = XX, 40 = XL, 60 = LX.

Crossrefs

Cf. A006968.

Programs

  • Maple
    for n from 1 to 3999 do if(length(convert(n, roman)) = length(convert(2*n, roman)) and length(convert(n, roman)) = length(convert(3*n, roman)))then printf("%d, ", n): fi: od: # Nathaniel Johnston, May 18 2011

Extensions

Extended by Nathaniel Johnston, May 18 2011

A199921 Number of Roman numerals < 4000 with n letters.

Original entry on oeis.org

7, 31, 93, 215, 389, 573, 691, 691, 573, 389, 215, 93, 31, 7, 1
Offset: 1

Views

Author

Martin Renner, Nov 12 2011

Keywords

Comments

Note that the sequence is completely symmetrical with the addition of the single (notional) Roman string of length zero. - Ian Duff, Jun 27 2017

Examples

			a(1) = 7, since there are the seven one-letter roman numerals I, V, X, L, C, D, M.
a(15) = 1, since there is one fifteen-letter roman numeral MMMDCCCLXXXVIII.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group, sort)
    a199921 n = a199921_list !! (n-1)
    a199921_list = map length $ group $ sort $ map (a055642 . a061493) [1..3999]
    -- Reinhard Zumkeller, Apr 14 2013
  • Maple
    for i from 1 to 15 do L[i]:={}: od: for n from 1 to 3999 do L[length(convert(n,roman))]:={op(L[length(convert(n,roman))]),n}; od:
    seq(nops(L[i]),i=1..15); # Martin Renner, Nov 13 2011
  • Mathematica
    romanLetterCount = Table[0, {15}]; j = 1; While[j < 4000, romanLetterCount[[StringLength[IntegerString[j, "Roman"]]]]++; j++]; romanLetterCount (* Alonso del Arte, Nov 12 2011 *)
    Rest[BinCounts[StringLength[RomanNumeral[Range[3999]]]]] (* Paolo Xausa, Mar 19 2024 *)
Previous Showing 11-20 of 46 results. Next