Spontaneous and controlled-diameter synthesis of single-walled and few-walled carbon nanotubes