mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   When in Rome... (https://www.mersenneforum.org/showthread.php?t=14618)

NBtarheel_33 2011-01-09 00:21

When in Rome...
 
Besides being a prime year, 2011 is also special because it requires the same number of "digits" in its Arabic decimal and its Roman numeral representations, to wit:

2011 = MMXI.

In the (relatively) near future, 2015 = MMXV and 2020 = MMXX are also such years. 2012 = MMXII and 2013 = MMXIII, however, are not.

Since the year 1 AD, what other years had (or will have) this distinction? (This is sort of an open ended puzzle - I'm not exactly sure of the answer myself - but it is something interesting I've been thinking about).

Uncwilly 2011-01-09 00:39

Are you asking only for "traditional" Roman numerals (no more than 3 of a single digit, etc., i.e. would you consider the following valid? MXM = 1990, MIM = 1999, MIIII = 1004, MXMI = 1991)?

CRGreathouse 2011-01-09 00:57

[QUOTE=Uncwilly;245200]Are you asking only for "traditional" Roman numerals (no more than 3 of a single digit, etc., i.e. would you consider the following valid? MXM = 1990, MIM = 1999, MIIII = 1004, MXMI = 1991)?[/QUOTE]

Those are the new-style Roman numerals, not the traditional ones. Traditional would be like VIIII for 9 or (()) for 10,000.

Uncwilly 2011-01-09 02:17

[QUOTE=CRGreathouse;245203]Those are the new-style Roman numerals, not the traditional ones. Traditional would be like VIIII for 9 or (()) for 10,000.[/QUOTE]Correct, I was trying to find out the bounds of the puzzle. One can write a prog to do the traditionals. The new-style is much harder to do.

NBtarheel_33 2011-01-09 08:24

[QUOTE=Uncwilly;245200]Are you asking only for "traditional" Roman numerals (no more than 3 of a single digit, etc., i.e. would you consider the following valid? MXM = 1990, MIM = 1999, MIIII = 1004, MXMI = 1991)?[/QUOTE]

Yes, I was originally thinking of the traditional Roman numerals rules (in fact, I wasn't aware that new rules had been adopted!), and the usual set of symbols with the usual values:

I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000.

So, in particular, 1990 would be MCMXC, 1999 would be MCMXCIX, 1004 would be MIV, and 1991 would be MCMXCI.

(Obviously, this admits fewer candidates - if we allow MXMI for 1991, we have an example of what we're looking for, but if we instead have 1991 = MCMXCIX, we don't.)

Incidentally, one of the most interesting math tutoring experiences I ever had was with a frustrated algebra student who insisted that X could not change from problem to problem, since it had a fixed value! The fixed value? You guessed it...10.

NBtarheel_33 2011-01-09 08:29

[QUOTE=CRGreathouse;245203]Those are the new-style Roman numerals, not the traditional ones. Traditional would be like VIIII for 9 or (()) for 10,000.[/QUOTE]

Actually, I don't think IIII would be allowed in the "traditional" rules. IIII as a construct seems to have come about from Louis XIV's desire to have more symmetric clock faces, well after the Romans.

Ever hear the one about the captain on the Roman sailing vessel? Couldn't figure out why the first mate always asked for two of every order the captain gave. :smile:

I've seen (M) and M-with-an-overbar for 10,000, but never (()).

NBtarheel_33 2011-01-09 08:34

[QUOTE=Uncwilly;245208]Correct, I was trying to find out the bounds of the puzzle. One can write a prog to do the traditionals. The new-style is much harder to do.[/QUOTE]

OK, so let's consider both.

If we little ol' human beans make it to 4000, I'm sure McWendy'sKing (a division of Taco Bell formed after the Great Fast Food Schism of 3347) will somehow capitalize off the year of MMMM.

davieddy 2011-01-09 09:28

[QUOTE=NBtarheel_33;245248]
Incidentally, one of the most interesting math tutoring experiences I ever had was with a frustrated algebra student who insisted that X could not change from problem to problem, since it had a fixed value! The fixed value? You guessed it...10.[/QUOTE]

When I first encounted the BASIC instruction "LET x = x + 1" I found
it a bit troublesome. Funny how quickly you can get over these things!

David

science_man_88 2011-01-09 14:06

[QUOTE=CRGreathouse;245203]Those are the new-style Roman numerals, not the traditional ones. Traditional would be like VIIII for 9 or (()) for 10,000.[/QUOTE]

any links to learn this if so I can try and make a PARI code for this puzzle.

never mind I found the OEIS entries lol.

science_man_88 2011-01-09 14:38

for the "old style"
iiii->v = -3 in length
viiii->x = - 4 in length
xxx->xl = -1 in length
xl-> l = -1 in length
lxxx - > xc = -2 in length
xc-> c = -1 in length
ccc-> cd = -1 in length
cd->d = -1 in length
dccc-> cm = -2 in length

though I guess we should say add the x and then convert it to xl and such just to help out more.

new style might be easier not sure.

science_man_88 2011-01-09 15:15

[QUOTE=science_man_88;245281]for the "old style"
iiii->v = -3 in length
viiii->x = - 4 in length
xxx->xl = -1 in length
xl-> l = -1 in length
lxxx - > xc = -2 in length
xc-> c = -1 in length
ccc-> cd = -1 in length
cd->d = -1 in length
dccc-> cm = -2 in length

though I guess we should say add the x and then convert it to xl and such just to help out more.

new style might be easier not sure.[/QUOTE]

my mistake it also allows xxxx and cccc if I read more correctly lol.

science_man_88 2011-01-09 15:31

[CODE]v=vector(100);v[1]=1;v[2]=2;v[3]=3;v[4]=4;v[5]=1;v[6]=2;v[7]=3;v[8]=4;v[9]=5;v[10]=1;for(i=11,#v,if(49<i%100<60,v[i]=v[i-10]+1,v[i-10]-3))[/CODE] is the best I can do and yes i know the last 2 commands are reversed order but that's because that's the only way I get close to [url]http://oeis.org/A092196[/url] and non negative answers.

science_man_88 2011-01-09 16:24

[QUOTE=science_man_88;245284][CODE]v=vector(100);v[1]=1;v[2]=2;v[3]=3;v[4]=4;v[5]=1;v[6]=2;v[7]=3;v[8]=4;v[9]=5;v[10]=1;for(i=11,#v,if(49<i%100<60,v[i]=v[i-10]+1,v[i-10]-3))[/CODE] is the best I can do and yes i know the last 2 commands are reversed order but that's because that's the only way I get close to [url]http://oeis.org/A092196[/url] and non negative answers.[/QUOTE]

doh I'm doing the complicated way for "traditional" lol. all i need is a loop for every symbol and to find the index in v to place it I multiply things lol. I'll start work on that after that I'll try the "modern" variety.

science_man_88 2011-01-09 16:37

[CODE]v=vector(3999);for(M=0,3,for(D=0,1,for(C=0,4,for(L=0,1,for(X=0,4,for(V=0,1,for(i=0,4,if(M==0 && D==0&& C==0 && L==0 && X==0 && V==0 && i==0,,v[M*1000+D*500+C*100+L*50+X*10+V*5+i*1]=M+D+C+L+X+V+i))))))))[/CODE] heres the code to do the traditional vector with.

CRGreathouse 2011-01-09 16:45

[QUOTE=NBtarheel_33;245252]I've seen (M) and M-with-an-overbar for 10,000, but never (()).[/QUOTE]

(M) is a different way of writing what I wrote as (()); other ways include ((I)), ⅭⅭⅠↃↃ, and ↂ. That last one (if it shows up for you) is how the symbol was actually written.

X with an overbar as 10,000 was a Middle Ages innovation never used by the Romans. (The Romans did occasionally put an overbar on their numerals, but this just meant "this is a number and not a word".) In that same Middle Age system M with an overbar was a million.

[QUOTE=NBtarheel_33;245252]Actually, I don't think IIII would be allowed in the "traditional" rules. IIII as a construct seems to have come about from Louis XIV's desire to have more symmetric clock faces, well after the Romans.[/QUOTE]

The chronology:

0. Etruscan numerals: IIII for 4, ɅIIII for 9.
1. Traditional Roman numerals: IIII for 4, VIIII for 9.
2. Middle-Age Roman numerals: IV for 4, IX for 9.
3. Renaissance: IIII for 4 but only on clocks, IX for 9.

10metreh 2011-01-09 17:08

In the "medieval" Roman numerals that are well known to most of us:
1, 5, 11, 15, 20, 40, 51, 55, 60, 90, 102, 104, 106, 109, 111, 115, 120, 140, 151, 155, 160, 190, 201, 205, 210, 250, 300, 401, 405, 410, 450, 502, 504, 506, 509, 511, 515, 520, 540, 551, 555, 560, 590, 601, 605, 610, 650, 700, 901, 905, 910, 950, 1003, 1007, 1012, 1016, 1019, 1021, 1025, 1030, 1041, 1045, 1052, 1054, 1056, 1059, 1061, 1065, 1070, 1091, 1095, 1102, 1104, 1106, 1109, 1111, 1115, 1120, 1140, 1151, 1155, 1160, 1190, 1201, 1205, 1210, 1250, 1300, 1401, 1405, 1410, 1450, 1502, 1504, 1506, 1509, 1511, 1515, 1520, 1540, 1551, 1555, 1560, 1590, 1601, 1605, 1610, 1650, 1700, 1901, 1905, 1910, 1950, 2002, 2004, 2006, 2009, 2011...
have the same number of "digits" in Roman and base-10 numerals. That list should be complete to 2011, but I might have made a mistake somewhere.

science_man_88 2011-01-09 17:12

[CODE]RomanModern(x=3999)=v=vector(3999);for(M=0,3,for(D=0,1,for(C=0,4,for(L=0,1,for(X=0,4,for(V=0,1,for(i=0,4,if(M==0 && D==0 && C==0 && L==0 && X==0 && V==0 && i==0,,v[M*1000+D*500+C*100+L*50+X*10+V*5+i*1]=M+D+C+L+X+V+i))))))));for(i=1,#v,if(i%5>3,v[i]=v[i]-2,if(i%10>8,v[i]=v[i]-1,if(i%50>39,v[i]=v[i]-2,if(i%100>90,v[i]=v[i]-1,if(i%500>399,v[i]=v[i]-2))))))[/CODE]

I can't find what went wrong here I know my first that doesn't match [url]http://oeis.org/A006968[/url] is for i = 9

I have a rule to implement now I just can't get how my computer might take it lol, if you notice if you reduce all multiples of 10^(x-1) under 10^x to the number 1-10 you find all numbers under 2 4 6 and 9 have the same number of digits as each other.

davar55 2011-01-09 18:07

[QUOTE=science_man_88;245304][CODE]RomanModern(x=3999)=v=vector(3999);for(M=0,3,for(D=0,1,for(C=0,4,for(L=0,1,for(X=0,4,for(V=0,1,for(i=0,4,if(M==0 && D==0 && C==0 && L==0 && X==0 && V==0 && i==0,,v[M*1000+D*500+C*100+L*50+X*10+V*5+i*1]=M+D+C+L+X+V+i))))))));for(i=1,#v,if(i%5>3,v[i]=v[i]-2,if(i%10>8,v[i]=v[i]-1,if(i%50>39,v[i]=v[i]-2,if(i%100>90,v[i]=v[i]-1,if(i%500>399,v[i]=v[i]-2))))))[/CODE]I can't find what went wrong here I know my first that doesn't match [URL]http://oeis.org/A006968[/URL] is for i = 9

I have a rule to implement now I just can't get how my computer might take it lol, if you notice if you reduce all multiples of 10^(x-1) under 10^x to the number 1-10 you find all numbers under 2 4 6 and 9 have the same number of digits as each other.[/QUOTE]

Why should i get to 9? It should only go to 4.

Efficiency is wasted in trying to improve your one liner.
Keep it simple and clear. (I think ... )

science_man_88 2011-01-09 18:19

[QUOTE=davar55;245314]Why should i get to 9? It should only go to 4.

Efficiency is wasted in trying to improve your one liner.
Keep it simple and clear. (I think ... )[/QUOTE]

sorry I'm thinking index not i doh lol.

CRGreathouse 2011-01-10 00:48

sm, see [url=http://rosettacode.org/wiki/Roman_numerals#PARI.2FGP]Roman numerals on RC[/url] where I wrote up quick solutions for old-style and medieval Roman numerals. Note that the output is printed rather than output (bad!) and that large numbers aren't supported in the modern/medieval function since I had no way of writing overlines.

Also note that there are many more styles than just the two I suggest here. For example, I'm fairly sure I recall a column (I thought it was Trajan's, but it looks like that's not right) that had "MMMMMMMMMMMMM" for 13,000. Perhaps this was just for effect, though.

science_man_88 2011-01-10 00:59

[QUOTE=CRGreathouse;245383]sm, see [url=http://rosettacode.org/wiki/Roman_numerals#PARI.2FGP]Roman numerals on RC[/url] where I wrote up quick solutions for old-style and medieval Roman numerals. Note that the output is printed rather than output (bad!) and that large numbers aren't supported in the modern/medieval function since I had no way of writing overlines.

Also note that there are many more styles than just the two I suggest here. For example, I'm fairly sure I recall a column (I thought it was Trajan's, but it looks like that's not right) that had "MMMMMMMMMMMMM" for 13,000. Perhaps this was just for effect, though.[/QUOTE]

I thought about a type like that myself without knowing it existed:

as for the RC function:

[code]()->v=vector(3999);for(M=0,3,for(D=0,1,for(C=0,4,for(L=0,1,for(X=0,4,for(V=0,1,for(i=0,4,if(M==0&&D==0&&C==0&&L==0&&X==0&&V==0&&i==0,,v[M*1000+D*500+C*100+L*50+X*10+V*5+i*1]=M+D+C+L+X+V+i))))))));return(v)
(n)->while(n>999999,n-=1000000;print1("((((I))))"));if(n>499999,n-=500000;print1("I))))"));while(n>99999,n-=100000;print1("(((I)))"));if(n>49999,n-=50000;print1("I)))"));while(n>9999,n-=10000;print1("((I))"));if(n>4999,n-=5000;print1("I))"));while(n>999,n-=1000;print1("(I)"));if(n>499,n-=500;print1("I)"));while(n>99,n-=100;print1("C"));if(n>49,n-=50;print1("L"););while(n>9,n-=10;print1("X"));if(n>4,n-=5;print1("V"););while(n,n--;print1("I"));print()[/code]

I'll admit it can go farther than mine care if i extend mine and see how they compare in length ?

as for the medieval one could you not use variables like BV for a bar over v ?

I see what you mean though.

science_man_88 2011-01-10 02:02

[QUOTE=10metreh;245303]In the "medieval" Roman numerals that are well known to most of us:
1, 5, 11, 15, 20, [COLOR="Red"]40[/COLOR], 51, 55, 60, [COLOR="red"]90[/COLOR], 102, [COLOR="red"]104[/COLOR], 106, [COLOR="red"]109[/COLOR], 111, 115, 120, [COLOR="red"]140[/COLOR], 151, 155, 160, [COLOR="red"]190[/COLOR], 201, 205, 210, 250, 300, [COLOR="red"]401, 405, 410, 450[/COLOR], 502, [COLOR="red"]504[/COLOR], 506, [COLOR="red"]509,[/COLOR] 511, 515, 520, [COLOR="Red"]540[/COLOR], 551, 555, 560, [COLOR="red"]590[/COLOR], 601, 605, 610, 650, 700, [COLOR="red"]901, 905, 910, 950,[/COLOR] 1003, 1007, 1012, 1016, [COLOR="red"]1019[/COLOR], 1021, 1025, 1030, [COLOR="red"]1041, 1045[/COLOR], 1052, [COLOR="Red"]1054[/COLOR], 1056, [COLOR="red"]1059[/COLOR], 1061, 1065, 1070, [COLOR="red"]1091, 1095[/COLOR], 1102, [COLOR="red"]1104[/COLOR], 1106, [COLOR="red"]1109[/COLOR], 1111, 1115, 1120,[COLOR="red"] 1140[/COLOR], 1151, 1155, 1160, [COLOR="red"]1190[/COLOR], 1201, 1205, 1210, 1250, 1300, [COLOR="Red"]1401, 1405, 1410, 1450[/COLOR], 1502, [COLOR="red"]1504[/COLOR], 1506, [COLOR="red"]1509[/COLOR], 1511, 1515, 1520, [COLOR="red"]1540[/COLOR], 1551, 1555, 1560, [COLOR="red"]1590[/COLOR], 1601, 1605, 1610, 1650, 1700, [COLOR="red"]1901, 1905, 1910, 1950[/COLOR], 2002, [COLOR="red"]2004[/COLOR], 2006, [COLOR="red"]2009[/COLOR], 2011...
have the same number of "digits" in Roman and base-10 numerals. That list should be complete to 2011, but I might have made a mistake somewhere.[/QUOTE]

well according to my old roman script here's the matching set for old roman:

[CODE]1,5,11,15,20,51,55,60,102,106,111,115,120,151,155,160,201,205,210,250,300,502,506,511,515,520,551,555,560,601,605,610,650,700,1003,1007,1012,1016,1021,1025,1030,1052,1056,1061,1065,1070,1102,1106,1111,1115,1120,1151,1155,1160,1201,1205,1210,1250,1300,1502,1506,1511,1515,1520,1551,1555,1560,1601,1605,1610,1650,1700,2002,2006,2011,2015,2020,2051,2055,2060,2101,2105,2110,2150,2200,2501,2505,2510,2550,2600,3001,3005,3010,3050,3100,3500,[/CODE]

I've highlighted what in your list doesn't match in mine so can't be tested with similarities.

CRGreathouse 2011-01-10 02:30

[QUOTE=science_man_88;245391]I've highlighted what in your list doesn't match in mine so can't be tested with similarities.[/QUOTE]

I'd generally expect that to be numbers with a 4 or a 9 in their decimal expansion, as well as numbers greater than 499 (or 488, for that matter).

CRGreathouse 2011-01-10 02:34

[QUOTE=science_man_88;245386]as for the medieval one could you not use variables like BV for a bar over v ?[/QUOTE]

Sure, or you could use _, or you could have it output HTML:
[code]<span style="text-decoration: overline">XV</span>MM[/code]
for 17,000. I'm not terribly pleased with any of these, so I just didn't implement it. You can do what you want.

If all you want is the number of characters, though, you can make a function that does that directly and get around the issue of output entirely.

science_man_88 2011-01-10 02:46

[QUOTE=CRGreathouse;245397]
If all you want is the number of characters, though, you can make a function that does that directly and get around the issue of output entirely.[/QUOTE]

I actually used a vector v and i eventually did get it returning, then I made my list by using:

[CODE]romanold();for(x=1,3999,if(length(Str(x))==v[x],print1(x",")))[/CODE]

romanold only does up to 3999 right now, I may change it. but it's something like my list that the OP was talking of I believe. next step for me would be checking for primes in this list. to match up with 2011. I haven't got a medieval function working like you have, and I'm still not sure what the other form you found is up to, worse I'm the one likely to make something like it so I'd kinda like to know how it worked.

davar55 2011-01-10 03:32

[quote]I actually used a vector v and i eventually did get it returning, then I made my list by using:

[CODE]romanold();for(x=1,3999,if(length(Str(x))==v[x],print1(x",")))[/CODE]romanold only does up to 3999 right now, I may change it. but it's something like my list that the OP was talking of I believe. next step for me would be checking for primes in this list. to match up with 2011. I haven't got a medieval function working like you have, and I'm still not sure what the other form you found is up to, worse I'm the one likely to make something like it so I'd kinda like to know how it worked.[/quote]It's a trivial point, but that extra comma at the end could be avoided.
Similar problem to the undesirably pluralized output I've often seen:
"1 objects".

NBtarheel_33 2011-01-10 09:46

Real mathematicians do it with pencil and paper!
 
Here's the "proofy" argument for what years work (using the commonly known, "Medieval" rules).

We have the symbols I, V, X, L, C, D, M. Let us consider years of 4 or less Arabic digits.

For the one-digit years: this is pretty easy. I = 1 and V = 5 are the only possibilities.

For the two-digit years: The first digit must be at least X but less than C, so the first digit will be either X or L. If it is X, then the second digit could be I, V, X, L, or C (which would make XI = 11, XV = 15, XX = 20, XL = 40, and XC = 90, respectively). If the first digit is L, on the other hand, then the second digit could be I, V, or X (which would make LI = 51, LV = 55, and LX = 60, respectively).

For the three-digit years: The first digit must be at least C but less than M, so the first digit will be either C or D.

Suppose the first digit is C. If the second digit is I, then the third digit can be I, V, or X (CII = 102, CIV = 104, CIX = 109). If the second digit is V, then the third digit can be I only (CVI = 106). If the second digit is X, then the third digit can be I, V, X, L, or C (CXI = 111, CXV = 115, CXX = 120, CXL = 140, CXC = 190). If the second digit is L, then the third digit can be I, V, or X (CLI = 151, CLV = 155, CLX = 160). If the second digit is C, then the third digit can be I, V, X, L, or C (CCI = 201, CCV = 205, CCX = 210, CCL = 250, CCC = 300). If the second digit is D, then the third digit can be I, V, X, or L (CDI = 401, CDV = 405, CDX = 410, CDL = 450). And finally, if the second digit is M, then the third digit can be I, V, X, or L (CMI = 901, CMV = 905, CMX = 910, CML = 950).

On the other hand, if the first digit is D - the same reasoning works for the second digit being I (DII = 502, DIV = 504, DIX = 509), the second digit being V (DVI = 506), the second digit being X (DXI = 511, DXV = 515, DXX = 520, DXL = 540, DXC = 590), the second digit being L (DLI = 551, DLV = 555, DLX = 560), and the second digit being C (DCI = 601, DCV = 605, DCX = 610, DCL = 650, DCC = 700). Note that the second digit *cannot* be D, nor can it be M. Hence we've enumerated all the three-digit possibilities.

Finally, consider the four-digit years. They must begin with M. Suppose the second digit is I. Then the third digit must be I (if not, then there are no legal ways in which to choose the fourth digit!), which forces the fourth digit to also be I. This yields MIII = 1003.

Suppose the second digit is V. Then the third digit again must be I, which forces the fourth digit to also be I. This yields MVII = 1007.

Suppose the second digit is X. Then the third digit may be I, V, X, L, or C. If the third digit is I, then the fourth digit must be I, V, or X (MXII = 1012, MXIV = 1014, MXIX = 1019). If the third digit is V, then the fourth digit must be I (MXVI = 1016). If the third digit is X, then the fourth digit can be I, V, or X (MXXI = 1021, MXXV = 1025, MXXX = 1030). If the third digit is L, then the fourth digit can be I or V (MXLI = 1041, MXLV = 1045). And if the third digit is C, then the fourth digit can be I or V (MXCI = 1091, MXCV = 1095).

Suppose the second digit is L. Then the third digit may be I, V, or X. If the third digit is I, then the fourth digit may be I, V, or X (MLII = 1052, MLIV = 1054, MLIX = 1059). If the third digit is V, then the fourth digit must be I (MLVI = 1056). And if the third digit is X, then the fourth digit may be I, V, or X (MLXI = 1061, MLXV = 1065, MLXX = 1070).

Suppose the second digit is C. Then the third digit may be I, V, X, L, C, D, or M. If the third digit is I, then the fourth digit may be I, V, or X (MCII = 1102, MCIV = 1104, MCIX = 1109). If the third digit is V, then the fourth digit must be I (MCVI = 1106). If the third digit is X, then the fourth digit may be I, V, X, L, or C (MCXI = 1111, MCXV = 1115, MCXX = 1120, MCXL = 1140, MCXC = 1190). If the third digit is L, then the fourth digit may be I, V, or X (MCLI = 1151, MCLV = 1155, MCLX = 1160). If the third digit is C, then the fourth digit may be I, V, X, L, or C (MCCI = 1201, MCCV = 1205, MCCX = 1210, MCCL = 1250, MCCC = 1300). If the third digit is D, then the fourth digit may be I, V, X, or L (MCDI = 1401, MCDV = 1405, MCDX = 1410, MCDL = 1450). And finally, if the third digit is M, the fourth digit may be I, V, X, or L (MCMI = 1901, MCMV = 1905, MCMX = 1910, MCML = 1950).

Suppose the second digit is D. Then the third digit may be I, V, X, L, or C, forcing the same choices for the fourth digit as in the previous case, and admitting the possible years MDII = 1502, MDIV = 1504, MDIX = 1509, MDVI = 1506, MDXI = 1511, MDXV = 1515, MDXX = 1520, MDXL = 1540, MDXC = 1590, MDLI = 1551, MDLV = 1555, MDLX = 1560, MDCI = 1601, MDCV = 1605, MDCX = 1610, MDCL = 1650, MDCC = 1700.

Lastly, suppose that the second digit is M. Then the third digit may be I, V, X, L, C, D, or M. It is left as an exercise for the reader to show that we have as possible candidates MMII = 2002, MMIV = 2004, MMIX = 2009, MMVI = 2006, MMXI = 2011, MMXV = 2015, MMXX = 2020, MMXL = 2040, MMXC = 2090, MMLI = 2051, MMLV = 2055, MMLX = 2060, MMCI = 2101, MMCV = 2105, MMCX = 2110, MMCL = 2150, MMCC = 2200, MMCD = 2400, MMCM = 2900, MMDI = 2501, MMDV = 2505, MMDX = 2510, MMDL = 2550, MMDC = 2600, MMMI = 3001, MMMV = 3005, MMMX = 3010, MMML = 3050, MMMC = 3100, MMMD = 3500, MMMM = 4000.

There are hence 145 years (only 26 remaining after 2011!) between AD 1 and AD 4000 inclusive where the number of Arabic digits and the number of Roman numerals needed to express the year number are equal. These years are:

1
5
11
15
20
40
51
55
60
90
102
104
106
109
111
115
120
140
151
155
160
190
201
205
210
250
300
401
405
410
450
502
504
506
509
511
515
520
540
551
555
560
590
601
605
610
650
700
901
905
910
950
1003
1007
1012
1014
1016
1019
1021
1025
1030
1041
1045
1052
1054
1056
1059
1061
1065
1070
1091
1095
1102
1104
1106
1109
1111
1115
1120
1140
1151
1155
1160
1190
1201
1205
1210
1250
1300
1401
1405
1410
1450
1502
1504
1506
1509
1511
1515
1520
1540
1551
1555
1560
1590
1601
1605
1610
1650
1700
1901
1905
1910
1950
2002
2004
2006
2009
2011
2015
2020
2040
2051
2055
2060
2090
2101
2105
2110
2150
2200
2400
2501
2505
2510
2550
2600
2900
3001
3005
3010
3050
3100
3500
4000

science_man_88 2011-01-10 15:37

[CODE](11:32)>romanold();forprime(x=1,4999,if(length(Str(x))==v[x],print1(x",")))
5,11,151,601,1021,1061,1151,1201,1511,1601,2011,3001,[/CODE]

so we have one more prime year that has the same length in both and that's 3001 good luck lasting the next 990 years to see it begin.

davieddy 2011-01-18 22:09

When in Rome....
 
...ask cmd for directions.


David

cmd 2011-01-18 22:40

not lead "|3 ° |\/| b" ... please
 
[QUOTE=davieddy;247249]...ask cmd for directions.


David[/QUOTE]



[URL="http://www.google.it/search?hl=it&&sa=X&ei=ARQ2TYnJFMigOpCc3LYC&ved=0CBkQBSgA&q=roma+auditorium+della+musica+matematica&spell=1"]choose[/URL] underground parking

Metro Euclid - R ° M e . It

davar55 2011-01-20 20:04

[QUOTE=davar55;245408]It's a trivial point, but that extra comma at the end could be avoided.
Similar problem to the undesirably pluralized output I've often seen:
"1 objects".[/QUOTE]

Sorry about quoting myself.

I didn't mean "I objects" but "1 objects".


All times are UTC. The time now is 04:55.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.