A very useful idea that is used to rationalize the formulae of organic compounds is the #"degree of unsaturation"#. An alkane is fully #"saturated"#, and it contains the MAXIMUM ALLOWABLE number of #C-H# bonds.
Alkanes are #"FULLY saturated"# and have a general formula of #C_nH_(2n+2)#. Try this out for #"methane,"# #"ethane,"# .........#"pentane, etc."#
Each degree of unsaturation, an olefinic bond OR a ring junction, corresponds to #1""^@# of unsaturation. So according to the scheme, #"ethane"# has the saturated formula of #H_3C-CH_3#, but #"ethylene"#, #H_2C=CH_2# has #1^@# of unsaturation. And here, acetylene, with 2 formal double bonds, has #2^@# of unsaturation. Halogen atoms count for one hydrogen; for nitrogen atoms, substract #NH# from the formula before assessing unsaturation; i.e. for #"ethylamine,"# #H_2NCH_2CH_3# #rarr C_2H_6#, i.e. #"no degrees of unsaturation"#.
How many degrees of unsaturation does benzene have? What about pyridine?