The original mobile phone numbers operated on the Analogue network. A typical analogue number for example was 018 773 096. This network operated from 1987 to 2000.
With the introduction of the Digital network, the current number ranges were originally allocated as follows;
04x1, 04x2, 04x3 Optus
04x4, 04x5, 04x6 Vodafone
04x7, 04x8, 04x9 Telstra
0433 Used by '3' network
04x0 Used by various networks
There are many variations to the above rule as many other smaller companies use particlar number ranges eg Virgin initially used 0431.
However mobile number portability means an individual number might have been "ported" and moved between networks. As long as the registered user of the number can be verified, any mobile number can be ported.
When a number is cancelled by the network, due to prepaid expiry or a customer request, the number is handed back to its original network (as per the above list). This number is quarrantined for 6 months and then released back onto the network to be used again.
No matter what number you purchase, you can subsequently move that number onto the network you desire.