The molecular formula of all the hexanes is C6H14. (Remember the
numbers should be subscripts.)
However there are isomers: CH3CH2CH2CH2CH2CH3,
(CH 3 ) 2 CH(CH 2 ) 2 CH 3
CH 3 CH 2 CH(CH 3 )CH 2 CH 3
CH 3 CH(CH 3 )CH(CH 3 )CH 3
CH 3 C(CH 3 ) 2 CH 2 CH 3
Wikipedia shows them clearly.