The days of the week (d.o.w) which are Sunday, Monday,
Tuesday,Wednesday,Thursday,Friday and Saturday (in that order) are respectively denoted by the numbers 0,1,2,3,4,5 and 6 . Any given year commencing with a particular d.o.w is assigned that value corresponding to that d.o.w. For example, the value ‘0’ would be assigned to a year commencing with a Sunday.
# A year is defined as ‘Matched’ if the remainder obtained, when the year is divided by 7, corresponds precisely with the value assigned to that particular year. For example, 2003 A.D. is NOT A Matched year since 2003 leaves a remainder of 1 upon division by 7 but January 1,2003 occurred on a Wednesday which is denoted by 3.
Determine the total number of ‘Matched’ years between 1960 A.D. and 2560 A.D.(both years inclusive) in accordance with the Western (Gregorian) Calendar System.
(In reply to
A solution by Dej Mar)
While your answer of 84 is correct, the method used has some flaws.
I understand that you mean for the "current year" to be the 2003 mentioned in the puzzle itself, as you begin the sequence with a dow of 3 and a remainder of 1, matching the values for 2003. However the full cycle beginning there is:
3460124560234501235601345612
1234560123456012345601234560
as 2003 itself was not a leap year, so the next Jan 1, was only 1 dow advanced; it was 2004 which was the leap year, advancing the dow an extra day for 2005.
The more serious flaw is not attending to the breaks in the position (phase) within the cycle caused by the Gregorian century rule within the range 2003-2560. If done for the whole 601-year span that way, we'd start at 1960 (dow=5; remainder 0) with
5012356013456123460124560234501
0123456012345601234560123456012
with matches in years 6 through 9 of the cycle. We'd have 21 cycles, for 84 matches, plus an additional 13 years, which exceeds 9, so we'd add four more matches to make 88.
Here are the actual 28-year cycles, with the starting year number shown on the left, and asterisks marking matching years:
1960 .....****...................
1988 .....****...................
2016 .....****...................
2044 .....****...................
2072 .....****...................
2100 .........****...............
2128 .........****...............
2156 .........****...............
2184 .........****...............
2212 .............****...........
2240 .............****...........
2268 .............****...........
2296 .................****.......
2324 .................****.......
2352 .................****.......
2380 .................****.......
2408 .................****.......
2436 .................****.......
2464 .................****.......
2492 .....................****...
2520 .....................****...
2548 .............
Or, if you choose to have cycles chosen so that 2003 starts a cycle:
1960 .....****......
1975 ..................****......
2003 ..................****......
2031 ..................****......
2059 ..................****......
2087 ......................****..
2115 ......................****..
2143 ......................****..
2171 ......................****..
2199 ..........................**
2227 **........................**
2255 **........................**
2283 **..........................
2311 ..****......................
2339 ..****......................
2367 ..****......................
2395 ..****......................
2423 ..****......................
2451 ..****......................
2479 ..****......................
2507 ......****..................
2535 ......****................
|
Posted by Charlie
on 2006-01-24 09:42:48 |