Anyone who follows the DetroitHockey.Net Twitter account has probably seen me rant about jersey numbers more than once. Jersey numbers (in all sports, but especially hockey) are interesting to me – to the point that I once created a database of historical player jersey numbers (the now-defunct HockeySweaterNumbers.com).

Today I was cataloging some hockey cards I hadn’t put away yet and I started mentally ranting about the #6 jersey worn by Bobby Ryan of the Ottawa Senators. Ryan’s “actual” number is #9 but when he arrived in Ottawa it was taken so he flipped it and went with #6, a number not traditionally worn by forwards. If I were him, I’d have gone with #90 (which is what both Mike Modano and Stephen Weiss did when they came to the Detroit Red Wings, where their usual #9 is retired) or back to the #54 he wore as a rookie (and has worn internationally for Team USA).

I’m a little bit of a stickler for those traditional numbers. Not militantly, otherwise I’d say no goalie should wear anything other than #1 or #30. I actually wrote that bias into my FHLSite software (which runs the fantasy leagues on DetroitHockey.Net) as a function that determines what number a traded (or drafted) player should wear on his new team.

At the start of each season, every player’s current number in the NHL is pulled into FHLSite as that player’s “default” number. This is actually one of the biggest flaws in the system, as it assumes that every player is wearing his preferred number in the NHL but we’ve seen that’s not true with Ryan (similarly, Brad Richards will wear #17 with the Red Wings next season because the #19 he prefers is retired [and the #91 he has worn when #19 wasn’t available may as well be]).

When a player joins a team, the first check is to see if that default number is already available. If it is, no additional work is needed, the player gets that number.

If there is a player with that number, the second check is to see if it’s actually that player’s default number. If it’s not, the new player will get his default number and the old player will get a new number (maybe even his default number, as it may have become available since that player joined the team). This was the case in real life, for example, when Brian Rafalski joined the Red Wings and took #28 from Tomas Kopecky.

If the player can’t get his default number for whatever reason (as was the case with Ryan, Modano, and Weiss), there are three branches based on if the default number is single- or double-digit or if the player is a goalie.

Goalie numbers are weird in hockey. In the days when teams only carried a single goaltender, the goalie almost always wore #1. When backups started joining rosters, the backup was often assigned #30. Then #35 started coming into use, then #31, then #29, then all sorts of numbers. Because of this, if a goalie’s default number can’t be used, the function will attempt the #30, #31, #35, and #1 (in that order) to find a new number for a goalie. A goalie like Andrei Vasilevskiy of the Tampa Bay Lighting, who wears (the ridiculous) #88, isn’t going to be forced to take a traditional number if his default number is available, but the search for a new number will start with traditional numbers if it needs to.

For skaters with double-digit numbers, the first attempt is to try the reverse of the number (such as what Richards has done in the past, taking #91 when #19 wasn’t an option). The second pass takes the first digit of the number and swaps out the second digit for a zero (as when Jordin Tootoo joined the New Jersey Devils and had to give up his usual [and since-regained] #22 for #20). The third pass only takes place if the first digit and second digit match, checking to see if that single digit is available (so a player wearing #44 would switch to #4 if neither #44 nor #40 were options).

Skaters with single-digit numbers have similar options in reverse. The first check is to append the single digit to itself (as Jeff Carter did when he went from wearing #7 with the Columbus Blue Jackets to wearing #77 with the Los Angeles Kings). The second is to try appending a zero to the digit (as Vincent Lecavalier did when he switched from #4 with the Lightning to #40 with the Philadelphia Flyers).

After all that, even if we found a number there’s still a sanity check to pass. As I mentioned, traditionally only goalies wear #1, #30, #31, and #35. Only defensemen wear #2, #3, #4 (forward Jean Beliveau of the Montreal Canadiens is a famous exception, and Lecavalier wore it in his honor), #5, and #6. Forwards don’t have any numbers restricted to them but #8, #9, #10, and #12 are pretty rare among defensemen so I counted those. That means that if our logic landed us with a restricted number (that isn’t the player’s default number), we toss it out and keep moving.

At this point, we can just try to get something close to the preferred number for skaters. We start at the default number and move one digit away in each direction until we find an open number. This is actually a way that Richards could have arrived at #17, as this method would have started at #19 and tried #20, #18, and #21 (all taken) before landing on #17 (available). The restricted numbers are honored here, as well, so if a skater’s default number is #28 on a team where #26, #27, #28, and #29 are taken, he’ll be assigned the open #25 rather than the open #30 or #31.

For goalies the search is simpler. Since we’ve already tried the default number and the traditional goalie numbers, we start over at #30 (which is overkill because we already know #30, #31, and #35 are taken) and increment by one until we find an open number. Goalie numbers in the 30s are commonplace now so while #32 or #37 (for example) aren’t as traditional, they’re not uncommon and are acceptable in my eyes.

As I mentioned, the big flaw is that it assumes that the number a player is currently wearing in the NHL is is actual number. Using this logic, Richards could get traded to a team where #17 is taken but #19 is available and he’d end up wearing #71. Or Ryan could get #66 instead of #9. It also doesn’t account for any historical number use, such as Ryan wearing #54 in other cases where he’s been able to wear #9. That said, it pretty much represents how I think hockey jersey numbers should work.