The general formula for straight chain alkanes is CnH2n+2, where n indicates the number of carbon atoms. For instance, methane (CH4) corresponds to C1H4, while ethane (C2H6) corresponds to C2H6. This formula is universally applicable to all straight chain alkanes, regardless of their carbon count. Understanding this formula is essential for identifying and classifying alkanes in organic chemistry. The formula effectively captures the relationship between carbon and hydrogen in these compounds.