For example, recent versions of Linux allows creating usernames with all numeric values with --badname useradd option. From manpages:
--badname: Allow names that do not conform to standards.