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-19 of 19 results.

A093703 Numbers whose Roman numeral representation, reversed, is a Roman numeral.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 10, 11, 19, 20, 30, 40, 50, 60, 90, 100, 110, 190, 200, 300, 400, 500, 600, 900, 1000, 1100, 1900, 2000, 3000
Offset: 1

Views

Author

Reinhard Zumkeller, May 17 2004

Keywords

Comments

A subset of this is A078715, palindromic Roman numerals. These are not "old style" Roman numerals (where 4 = IIII).
The sequence contains only values less than 4000, see A078715 for a discussion of the Roman 4M-problem.

Examples

			a(1) = 1 because Roman(1) = I and Reversal(I) = I, which is Roman.
a(4) = 4 because Roman(4) = IV and Reversal(IV) = VI, which is Roman.
a(10) = 19 because Roman(19) = XIX which is a palindromic Roman numeral.
a(27) = 900 because Roman(900) = CM and Reversal(CM) = MC, which is Roman.
40 == XL -> LX == 60, therefore 40 and 60 are terms.
1999 is not in the sequence because "MIM" is not a well-formed Roman numeral for 1999, although it looks like one; see Schildberger.
		

Crossrefs

Cf. A078715 (palindromic Roman numerals), A061493.

Programs

  • Haskell
    a093703 n = a093703_list !! (n-1)
    a093703_list = filter
       ((`elem` map a061493 [1..3999]) . a004086 . a061493) [1..]
    -- Reinhard Zumkeller, Apr 14 2013
  • Mathematica
    Select[Range[3000], RomanNumeral[FromRomanNumeral[#]] == # & [StringReverse[RomanNumeral[#]]] &] (* Paolo Xausa, Mar 03 2024 *)

Extensions

Added sections of text from the erroneous A123054. - N. J. A. Sloane, Apr 15 2013

A093788 The Roman numerals, with "i" replaced by "1", "v" replaced by "5", "x" replaced by 10, etc.

Original entry on oeis.org

1, 11, 111, 15, 5, 51, 511, 5111, 110, 10, 101, 1011, 10111, 1015, 105, 1051, 10511, 105111, 10110, 1010, 10101, 101011, 1010111, 101015, 10105, 101051, 1010511, 10105111, 1010110, 101010, 1010101, 10101011, 101010111, 10101015, 1010105
Offset: 1

Views

Author

William J. Rapaport (rapaport(AT)buffalo.edu), May 17 2004

Keywords

Comments

A more compact and easier to parse version is A061493, where I, V, X, L, ... are replaced by 1, 2, 3, 4, ... The terms of this sequence can be converted to those of A061493 by changing digits '5' to '2' and deleting each digit '0' upon increasing by 2 the nonzero digit to its left. - M. F. Hasler, Jul 25 2016

Crossrefs

Programs

  • PARI
    {A093788(n)=A061493(n,,[1000, 1000, 900, 1001000, 500, 500, 400, 100500, 100, 100, 90, 10100, 50, 50, 40, 1050, 10, 10, 9, 110, 5, 5, 4, 15, 1, 1])} \\ M. F. Hasler, Jul 25 2016

Extensions

Cross-references added and data double-checked by M. F. Hasler, Jul 25 2016

A093796 Sequence of digit-values after concatenating the natural numbers < 4000 in Roman numeral representation.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 1, 5, 1, 1, 5, 1, 1, 1, 1, 10, 10, 10, 1, 10, 1, 1, 10, 1, 1, 1, 10, 1, 5, 10, 5, 10, 5, 1, 10, 5, 1, 1, 10, 5, 1, 1, 1, 10, 1, 10, 10, 10, 10, 10, 1, 10, 10, 1, 1, 10, 10, 1, 1, 1, 10, 10, 1, 5, 10, 10, 5, 10, 10, 5, 1, 10, 10, 5, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 18 2004

Keywords

Comments

In other words, read the sequence of Roman numerals of natural numbers without spaces: I II III IV V VI VII VIII IX, ..., replacing I by 1, V by 5, X by 10, etc.

Examples

			I,II,III,IV,V,VI,VII,VIII,IX,X,XI,XII, ...
I,(I,I),(I,I,I),(I,V),V,(V,I),(V,I,I),(V,I,I,I),(I,X), ...
1,(1,1),(1,1,1),(1,5),5,(5,1),(5,1,1),(5,1,1,1),(1,10), ...
1,1,1,1,1,1,1,5,5,5,1,5,1,1,5,1,1,1,1,10,10,10,1,10,1,1, ...
		

References

  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See Question 300(b), page 199.

Crossrefs

Cf. A007376.
Cf. A061493; A222581 (run lengths).

Programs

  • Haskell
    import Data.List (unfoldr)
    a093796 n = a093796_list !! n
    a093796_list = concatMap (reverse . unfoldr r) $ map a061493 [1..3999]
       where r 0 = Nothing
             r x = Just ([0,1,5,10,50,100,500,1000] !! fromInteger d, x')
                   where (x', d) = divMod x 10
    -- Reinhard Zumkeller, Apr 14 2013
    
  • Maple
    for n from 1 to 50 do r:=convert(n, roman): for j from 1 to length(r) do printf("%d, ", convert(r[j],arabic)): od: od: # Nathaniel Johnston, May 18 2011
  • Mathematica
    A093796full = Flatten[FromRomanNumeral[Characters[RomanNumeral[Range[3999]]]]];
    A093796full[[;;100]] (* Paolo Xausa, Mar 03 2024 *)
  • 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 r(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 afull():
        v = {"I":1, "V":5, "X":10, "L":50, "C":100, "D":500, "M":1000}
        ans = []
        for i in range(1, 4000): ans.extend([v[d] for d in r(i)])
        return ans
    print(afull()[:80]) # Michael S. Branicky, Mar 04 2024

A105416 Numbers that are pandigital in Roman numerals using each of the symbols I, V, X, L, C, D and M exactly once.

Original entry on oeis.org

1444, 1446, 1464, 1466, 1644, 1646, 1664, 1666
Offset: 1

Views

Author

Robert Happelberg (roberthappelberg(AT)yahoo.com), Apr 06 2005

Keywords

Comments

Subset of A105417.

Examples

			a(1) = 1444 because written in Roman numeral it is MCDXLIV, using each of the symbols I, V, X, L, C, D and M exactly once.
		

Crossrefs

Programs

A105417 Numbers that are pandigital in Roman numerals, using each of the symbols I, V, X, L, C, D and M at least once.

Original entry on oeis.org

1444, 1446, 1447, 1448, 1464, 1466, 1467, 1468, 1474, 1476, 1477, 1478, 1484, 1486, 1487, 1488, 1644, 1646, 1647, 1648, 1664, 1666, 1667, 1668, 1674, 1676, 1677, 1678, 1684, 1686, 1687, 1688, 1744, 1746, 1747, 1748, 1764, 1766, 1767, 1768, 1774, 1776
Offset: 1

Views

Author

Robert Happelberg (roberthappelberg(AT)yahoo.com), Apr 06 2005

Keywords

Comments

Contains A105416. The largest member of this sequence is 3888, MMMDCCCLXXXVIII.
From Daniel Forgues, Jul 31 2011: (Start)
There are 192 = 3 * 4^3 pandigital Roman numerals:
3 ways to start: M*, MM*, MMM* (since no Roman numeral stood for 5000)
4 ways for the hundreds: *CD*, *DC*, *DCC*, *DCCC*
4 ways for the decades: *XL*, *LX*, *LXX*, *LXXX*
4 ways for the units: *IV, *VI, *VII, *VIII (End)
Equivalently, numbers of the form abcd with 1 <= a <= 3 and b,c,d in {4,6,7,8}. - M. F. Hasler, Jul 10 2018

Examples

			a(3) = 1447 because its Roman numeral representation, MCDXLVII, uses each of the symbols V, X, L, C, D and M once and the symbol I twice.
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub, sort)
    a105417 n = a105417_list !! (n-1)
    a105417_list = filter ((== "1234567") . sort . nub . show . a061493) [1..3999]
    -- Reinhard Zumkeller, Apr 14 2013
    
  • Maple
    with(StringTools): for n from 1 to 3999 do r:=convert(n,roman): if Search("I",r) > 0 and Search("V",r) > 0 and Search("X",r) > 0 and Search("L",r) > 0 and Search("C",r) > 0 and Search("D",r) > 0 and Search("M",r) > 0 then printf("%d, ", n): fi: od: # Nathaniel Johnston, May 18 2011
    A105417 := select(n->nops(convert(convert(n,roman),set))=7, `$`(3888)) # M. F. Hasler, Jul 10 2018
  • Mathematica
    Select[Range[900,1776],ContainsAll[Characters[RomanNumeral[#]],{"M","C","D","X","L","I","V"}]&] (* James C. McMahon, Jan 24 2024 *)
  • PARI
    A105417=vector(192,i,fromdigits(apply(d->d-!d,digits(i+63,4)))+555) \\ M. F. Hasler, Jul 10 2018

Formula

A006968(a(n)) >= 7. - Reinhard Zumkeller, Apr 14 2013

A082763 Roman numeral contains an asymmetric symbol (L).

Original entry on oeis.org

40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152
Offset: 1

Views

Author

Rick L. Shepherd, May 21 2003

Keywords

Comments

I,V,X,C,D,M - and even the vinculum (bar) and apostrophus (backwards "C") - are each symmetric: horizontally, vertically, or both.
Numbers containing a 4 when decimally encoded with A061493. - Reinhard Zumkeller, Apr 14 2013

Examples

			40 = XL, 89 = LXXXIX, 140 = CXL.
		

Crossrefs

Cf. A006968 (Roman numerals main entry), A078715 (Palindromic Roman numerals).

Programs

  • Haskell
    a082763 n = a082763_list !! (n-1)
    a082763_list = filter (containsL . a061493) [1..3999] where
       containsL x = d == 4 || x > 0 && containsL x' where
                     (x',d) = divMod x 10
    -- Reinhard Zumkeller, Apr 14 2013
  • Maple
    with(StringTools): for n from 1 to 152 do if(Search("L", convert(n, roman)) > 0)then printf("%d, ", n): fi: od: # Nathaniel Johnston, May 18 2011
  • Mathematica
    Select[Range[200],StringCases[RomanNumeral[#],"L"]!={}&] (* Harvey P. Dale, Jun 10 2023 *)
  • PARI
    /* "%" use below is actually identical to lift(Mod(n-1,50)) */ /* (n-1)50 could be used for integer division below */ /* instead of floor, but the OEIS sometimes loses  */ /* characters depending upon where on a submitted line they are. */ a(n)=floor((n-1)/50)*100+40+(n-1)%50 for(n=1,125,print1(a(n),","))
    

Formula

a(n+50) = a(n) + 100 for n >= 1 [a(n+L) = a(n) + C for n >= I], a(1) = 40 [a(I) = XL], a(n+1) = a(n) + 1 for 1 <= n <= 49 [a(n+I) = a(n) + I for I <= n <= XLIX]; so a(n) = floor((n-1)/50)*100 + 40 + ((n-1)(mod 50)) for n >= 1 [a(n) = floor((n-I)/L)*C + XL + ((n-I)(mod L)) for n >= I].

A093785 Numbers that are divisible by every digit in their Roman numeral representation.

Original entry on oeis.org

1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 500, 1000, 2000, 3000
Offset: 1

Views

Author

Reinhard Zumkeller, May 17 2004

Keywords

Comments

The sequence contains only values less than 4000, see A078715 for a discussion on the Roman 4M-problem.

Examples

			I, II, III, V, X, XX, XXX, L, C, CC, CCC, D, M, MM, MMM.
		

Crossrefs

Cf. A034838.
Cf. A061493.

Programs

  • Haskell
    a093785 n = a093785_list !! (n-1)
    a093785_list = filter p [1..3999] where
       p v = q $ a061493 v where
         q w = w == 0 || v `mod` ([0,1,5,10,50,100,500,1000] !! d') == 0 && q w'
              where  (w',d) = divMod w 10; d' = fromInteger d
    -- Reinhard Zumkeller, Apr 14 2013

A120433 Numbers whose Roman numeral representation uses the subtractive notation.

Original entry on oeis.org

4, 9, 14, 19, 24, 29, 34, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 54, 59, 64, 69, 74, 79, 84, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 104, 109, 114, 119, 124, 129, 134, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 154, 159, 164, 169, 174
Offset: 1

Views

Author

Christian Amet, Jul 13 2006

Keywords

Comments

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

Examples

			In Roman numerals, 14 is XIV, that is, X + (V - I) = 10 + (5 - 1) = 14, so 14 is in the sequence.
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.
		

Crossrefs

Cf. A061493.
Cf. A016897, 5n + 4 (first diverges after 39, as that sequence does not include 40, 41, 42, 43).

Programs

  • Maple
    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
  • Mathematica
    Select[Range[3999], StringContainsQ[RomanNumeral[#], {"IV", "IX", "XL", "XC", "CD", "CM"}] &] (* Michael De Vlieger, Aug 20 2024 *)
  • Python
    def ok(n): return {"4", "9"} & set(str(n))
    afull = [k for k in range(4000) if ok(k)] # Michael S. Branicky, Aug 20 2024

A285511 Value of the n-th Roman number interpreted as Latin alphabetic number.

Original entry on oeis.org

9, 243, 6327, 256, 22, 581, 15115, 392999, 258, 24, 633, 16467, 428151, 16480, 646, 16805, 436939, 11360423, 16482, 648, 16857, 438291, 11395575, 438304, 16870, 438629, 11404363, 296513447, 438306, 16872, 438681, 11405715, 296548599, 11405728, 438694, 11406053, 296557387, 7710492071, 11405730, 636
Offset: 1

Views

Author

Martin Janecke, Apr 20 2017

Keywords

Comments

Lists can be numbered using different counter styles, for example using the Latin alphabet A, B, C, ..., Z, AA, AB, ... or the Roman number system I, II, III, IV, V, VI, ... Both these counter styles are defined in CSS Counter Styles Level 3 as "upper-alpha" and "upper-roman". Roman number representations are defined for the range 1 to 3999 only. Roman numerals are a subset of Latin alphabet letters; for every Roman number there is exactly one alphabetic number that looks identical. Denote the n-th Roman number by R(n) and the m-th alphabetic number by L(m), then R(n) and L(a(n)) look identical.

Examples

			The number n = 1 is written "I" in the Roman number system. "I" being the ninth letter in the alphabet is also the ninth number in the alphabetic number system. Therefore a(1) = 9.
The number n = 2 is written "II" in the Roman number system. "II" is also the 243rd number in the alphabetic number system, because "I" is the ninth letter in the 26-letter alphabet and 9*26^1+9*26^0 = 243. Therefore a(2) = 243.
The number n = 3 is written "III" in the Roman number system. "III" is also the 6327th number in the alphabetic number system because "I" is the ninth letter in the 26-letter alphabet and 9*26^2+9*26^1+9*26^0 = 6327. Therefore a(3) = 6327.
The number n = 4 is written "IV" in the Roman number system. "IV" is also the 256th number in the alphabetic number system because "I" is the ninth letter in the 26-letter alphabet and "V" is the 22nd letter, therefore a(4) = 9*26^1 + 22 = 256.
The number n = 600 is written "DC" in the Roman number system. "DC" is also the 107th number in the alphabetic number system, because "D" and "C" are the fourth and third letters in the 26-letter alphabet and 4*26^1+3*26^0 = 107. Therefore a(600) = 107.
		

Crossrefs

Previous Showing 11-19 of 19 results.