You can use the 'nl' utility to number the lines:
nl -nln /usr/local/etc/sudoers
I'm not quite sure if sudo count blank lines, if so:
nl -ba -nln /usr/local/etc/sudoers
will number blank lines.
You can pass it through grep:
nl -nln /usr/local/etc/sudoers | grep -E "(^39|^55|^57)"
or you may need to add the -ba option to number blank lines.
Hope it helps.