In a polypeptide, oxygen atoms are typically found in the carboxyl groups (-COOH) at the end of each amino acid, while nitrogen atoms are found in the amino groups (-NH2). Since the R groups do not contain oxygen or nitrogen, the O and N atoms must be in the main chain, which is consistent with the structure of amino acids and the formation of peptide bonds.