Preparation of hydrocarbons from hydrocarbons containing a different number of carbon atoms by redistribution reactions