The following dihaloalkanes gives an N-(haloalkyl)phthalimide on reaction with one equivalent of the potassium salt of phthalimide. Deduce the structure of the phthalimide derivative formed:
If you look at the potassium salt of phthalimide, the nitrogen part, with its negative charge, is a capable nucleophile. This charge is stabilized by the presence of the two electron-withdrawing carbonyl groups on either side of the nitrogen anion. But it is a nucleophile nevertheless:
In this problem, since there is just the one equivalent of the salt, the nucleophile attacks the less hindered carbon at position 1 of 1,3-dibromopentane. The Bromide might form KBr depending on the nature of the solvent.