Electronic and transport properties of a carbon-atom chain in the core of semiconducting carbon nanotubes