Post Reply 
HHC 2014 Programming Contest
09-24-2014, 11:46 AM (This post was last modified: 09-24-2014 09:40 PM by Paul Dale.)
Post: #6
RE: HHC 2014 Programming Contest
Just ignore this post. It is completely misguided and wrong Big Grin

- Pauli


(09-24-2014 09:41 AM)Paul Dale Wrote:  Would the absence of a leap year around three out of four centuries make a difference here I wonder?

Turns out it doesn't.

Odd numbers of PDP dates can only occur when one of January 1st or December 31st is prime. This means that a sequence of such years requires December 31st of one and January 1st of the next to be prime and a skip until December 31st of the subsequent year. Starting with January 1st instead of December 31st doesn't help because for January 1st to be PDP, the previous December 31st must be too.


  1. December 31st prime, assume without loss of generality that it is congruent to 1 mod 3
  2. January 1st (1 day), congruent to 2 mod 3
  3. December 31st (729 days), congruent to 2 mod 3
  4. January 1st (1 day), congruent to 0 mod 3, cannot be prime.


Put a leap year in the second or third year (a leap year in the first doesn't matter):

  1. December 31st prime, assume it is congruent to 1 mod 3
  2. January 1st (1 day), congruent to 2 mod 3
  3. December 31st (730 days), congruent to 0 mod 3, cannot be prime.


The lengths of time and their modulo 3 outcomes are:

Code:
    Interval      mod 3
    1 day           1  
    729 days        0  
    730 days        1

- Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2014 Programming Contest - Paul Dale - 09-24-2014, 09:13 AM
RE: HHC 2014 Programming Contest - Paul Dale - 09-24-2014 11:46 AM
RE: HHC 2014 Programming Contest - BruceH - 10-02-2014, 09:35 PM
RE: HHC 2014 Programming Contest - Jeff O. - 09-29-2014, 01:41 PM
RE: HHC 2014 Programming Contest - Jeff O. - 09-30-2014, 04:39 PM
RE: HHC 2014 Programming Contest - Jeff O. - 10-06-2014, 05:01 PM
RE: HHC 2014 Programming Contest - Jeff O. - 10-07-2014, 12:26 PM
RE: HHC 2014 Programming Contest - Werner - 10-03-2014, 07:35 AM
RE: HHC 2014 Programming Contest - C.Ret - 10-05-2014, 10:02 AM
RE: HHC 2014 Programming Contest - Werner - 10-05-2014, 08:02 PM



User(s) browsing this thread: 1 Guest(s)