Pokémon Gold Version, Silver Version, and Crystal Version - Lucky Number Show
You can earn different prizes in the Lucky Number Show if one of your
Pokémon’s ID numbers match the winning number. Here is the complete list:
If last 2 digits (in decimal) match, you’ll win a PP Up.
If last 3 digits match, you’ll win an Exp.Share.
The game doesn’t check if last four digits match.
If last 5 digits match, you’ll win a Master Ball.
The Pokémon with the winning ID need not be in your party, but can also be in the currently selected PC box.