Preparation of hydrocarbons from hydrocarbons containing a smaller number of carbon atoms by condensation of hydrocarbons with partial elimination of hydrogen