Dunno about the N&W or Pennyless but I do know a few things about how some railroads numbered their locos.
Most of the time, the railroad would give a certain locomotive class a separate number section. This was especially true in steam. The loco with the first of the numbers was considered a class locomotive. An example of this would be like the steam on the Reading. The 3000 series was the 2-10-2 K1sb locomotives, while the 2100 series was the T-1 4-8-4s.
Diesels could become a bit more complicated. While the railroads would still make a class per number, they could also add other things to the number combination in order to designate specific features. If I remember correctly, the Reading would make sure that all steam generator equipped locomotives had a "4" in the second number of their loco designation. Thus an RS3 would have a class of ### while an RS3 with a steam generator would be numbered #4#.
Of course, as the railroads aged and began to run out of money for passenger ops, they most likely would have just switched back to the usual class system. Some railroads also switched their entire numbering system in order to be compatible with other railroads. The Reading changed the numbers on their GP30s in order to mesh with the B&O's numbering system due to power pooling.
In addition to numbering, railroads would also classify their locomotives.
An example is below(from the Reading.)
RS1=RS3
RS2=AS16
RS3=GP7
DF-3=FA
DP-1=FP7
DF-4=F7
OE-1= AGEIR boxcab
This is the more simple, and original classification of the Reading. RS means road switcher, DF is diesel freight(cab unit) DP is diesel passenger, and OE is Oil Electric. It is a very simple way to classify locomotives.
Eventually, the Reading moved on to a bit more of a complicated class scheme.
Take the GP35 for example. Its classification was RSE-14
This stood for Road Switcher EMD- dynamic break equpped(1) Radio equipped (4)
There were actually three ALCo locos classified as RSA-14 locomotives. (C430, C630 and C424)
Eventually, with dwindling money, the Reading just went to the standard loco designations of GP39-2, SD45, ect.
Other railroads used similar designations for their locomotives, or ones that were even more complicated, and most of these railroads had the class written on the cab side near the horsepower rating.