Let a 52 deck of numbered cards be created as follows:
2 special cards: 0 and 1
25 powers of 2: 2, 4, 8, ..., 2^25
25 powers of 3: 3, 9, 27, ..., 3^25
Shuffle the deck and draw at random 3 cards. Evaluate the product of the 3 numbers, say P.
What is the probability of P=0?
What is the probability of P being a non zero integer square?
What is the probability of P being a 4-digit number?
Part 1 is pretty easy. The product P will be zero if and only if we draw the 0 card.
There is a (51/52)*(50/51)*(49/50) = 49/52 chance of not drawing the 0 card, so then the probability of P being 0 is the complement 1 - 49/52 = 3/52.
Part 2. There are a total of 52C3=22100 distinct three card hands. To count the number of hands with P being a nonzero square, first I will classify the not 0 cards into three classes: squares, 2*squares, and 3*squares.
The squares consist of the union of 1, the set {2^2, 2^4, ..., 2^24} and the set {3^2, 3^4, ..., 3^24}. This set of squares has a total of 25 members.
The 2*squares consists of 3, 3^3, ..., 3^25 and has 13 members.
Similarly, the 3*squares consists of 2, 2^3, ..., 2^25 and has 13 members.
For P to evaluate to a nonzero square there are three mutually exclusive ways: draw three members from the squares, draw one member of the squares plus two members of the 2*squares, or draw one member of the squares plus two members of the 3*squares.
Those evaluate respectively to 25C3=2300, 25*(13C2)=1950, and 25*(13C2)=1950. Then the probability for Part is evaluated as (2300+1950+1950)/22100 = 6200/22100 = 62/221.