If you mean the thing that you do once, it reads out a 5 digit number, and you get a thing based on how many are matched?
If so - There is a set group of prizes based on how many number matched, the more people you have traded with the more numbers you have (it looks at the trainer number for every Pokemon you have) if you match all the numbers, the prize is a Master Ball.
If you mean that thing that changes every day and you can draw so long as you have money, at the top of the Dept. Store? - I think they just set up a bunch of different groups of 3, and it cycles through over the course of so many days, and restarts when it gets through the list.