I agree with what people have said. Except I've never heard of numbering based on HP, year purchased, etc.
To add from personal experience, somewhat unfairly generalizing and stereotyping.
Most shortlines have 4digit numbers, often from Class I's, without changing them.
Ex: CP 8016 & 8018 became GWWD 8016 & 8018. Often this is the case when the new owner couldn't care less what the engine looks like, i.e. they don't bother with the paint, patch over the former reporting marks and add their own initials. Thus CP Rail becomes WHRS Rail. I don't complain as there aren't that many ex-CP RS23's running around!
If a locomotive got repainted (this includes leassing from large leassing firms such as LLPX or CEFX), it probably received its own numbers (then again NREX ussually keeps former CP/SOO/CN/GTW numbers on its rent-a-wrecks).
ex: CN 4122 became CEMR 4001. (don't quote me on the numbers, I'm going by memore here), and received a nice new coat of paint.
Lastly it's important to note that there really is no 100% pattern, mostly going by common sence. Referring to GWWD again. They bought Devco 200 & 202, renaming and repainting them GWWD 200 & 202. So when they bought a S-13 (4digit number) from BC Hydro, they renumbered and repainted it to GWWD 201 so that it would fit in.
A tendency I find is that most numbers aren't spread out, they're kind of close together.
Ex: WAMX 9600-9620series, ex-CN 9600-9620series GP40-2LW's in CN colors
CEMR 4000-4003, ex-CN 4000-4199 series, now in CEMR colors!
GWWD keeps its numbers in the 200-205 range, except for the 8000's, which are for parts anyway.
Then again if you're modelling a Railink/RailAmerica based shortline, then you got numbers all over the place! CBNS has SD45-2's in the 907-914 series, GP9-4's (ex-SP GP9's!) in the 4000-4003 series and LLPX 226* GP38-2's (ex-IC GP40's!). Not to mention all kind of odd Geeps in the shops all of whom have different number series.
I find that single-two digit numbers were prretty common in the past, up tp 60s I would say, since then shortlines and Class I's have been somewhat avoiding small numbers like that, sticking to the 4digit ones. Then again there are lots of excamples to prove me wrong here too.
Hope I didn't confuse you!