On a serious note the first three digits, I think, have a code related to either train, the zone, or the PRS Zone booked from., and the, I once had two tickets booked online for two trains originating on KR. By mistake I entered the three digis=t number of the second ticket and I actually got the details of a UP originated ticket on the same day.
To cut a long story short, I believe the first 3 digits are not randomly generated but the next six are.