Slight correction: The number that determines passage into Mirage Island is not your pokemon's ID number. Each day, a random 16-bit number gets assigned to Mirage Island. If this matches the last 16 bits of any of your party pokemon's personality values, you will be able to access Mirage Island. Personality values are used for several traits including Unown letter, nature, whether your pokemon has its first or second ability, Spinda spot pattern, etc. This particular part includes the byte for your pokemon's gender value as well as another part which as a byte is only used to determine whether a Wurmple becomes a Silcoon or a Cascoon.
Every pokemon's personality value is different (it is extremely, absurdly rare for there to be an exception). This is why you can change your party around and get another shot at whether the Pacifidlog Man sees Mirage Island. It is a very improbable occasion (65535/6 = only a 1 in 10922.5
chance per team of 6 pokemon); I have never been to Mirage Island once.