Teaser 3138: Primus inter impares
From The Sunday Times, 13th November 2022 [link] [link]
Just nine Prime Ministers held office in the Kingdom of Primea during the 20th century. No two Prime Ministers held office at the same time, none had more than one period in office, and the gap between successive Prime Ministers’ terms was never more than a month. Each held office for a period of time in which the number of whole years was a different prime number (e.g. holding office from 1910 to 1915 could cover four or five whole years) and no Prime Minister served for more than 30 years. Appropriately, they all took office in prime years, but there was no change of Prime Minister in 1973.
In which years during the 20th century did new Prime Ministers in Primea take up office?
[teaser3138]
Jim Randell 5:12 pm on 11 November 2022 Permalink |
This Python program runs in 51ms. (Internal runtime is 554µs).
Run: [ @replit ]
Solution: The years are: 1901, 1907, 1931, 1949, 1979, 1993, 1997, 1999.
The incumbent at the start of the 20th century began office in 1889, so we have:
There are two primes left that could correspond to the length of the term of the incumbent at the end of the 20th century. Note that it is not required that the term of the successor (if any) starts in a prime year.
LikeLike
Frits 1:24 pm on 12 November 2022 Permalink |
@Jim, as I don’t have access to a PC I can’t publish/test a program myself.
I think a check is needed to see if the last Prime Minister can serve a prime number of years and which ends after the 20th century (if high prime numbers already have been used this may not be possible anymore).
LikeLike
Hugh Casement 7:17 am on 13 November 2022 Permalink |
Frits, the wording of the puzzle is vague on that score, but I think if we do allow the last term of office to extend beyond the end of the century then we get multiple solutions. Jim (line 25) would seem to agree with me that we need to start looking before the beginning of the century.
LikeLike
Jim Randell 8:18 am on 13 November 2022 Permalink |
@Frits: I did wonder about that. I check the final PM of the 20th century does not have a term that is longer than 30 years (line 12), and when I saw that there was only a single possible solution I didn’t worry about the actual length of the term, as it starts very close to the end of the century, and there are 2 unused primes available.
Here is the code with an extra check to ensure the final term length is possible. (I also include code to specify the first and last years of the 20th century. I am using the “strict” definition 1901-2000, but you get the same answer with the “popular” usage of 1900-1999).
Run: [ @replit ]
But it seems that it may be possible that the final PM is still in office at the time the puzzle was set (having served less than 30 years so far), so we can’t say what the length of the term will be yet.
LikeLike