Addition of one equivalent of ammonia to 1-bromoheptane gives a mixture of heptan-1-amine, some dialkylamine, some trialkylamine, and even some tetraalkylammonium bromide.
(a) Give a mechanism to show how this reaction takes place, as far as the dialkylamine.
(b) How would you modify the procedure to get an acceptable yield of heptan-1-amine?