The production yields of gamma(1S), gamma(2S), and gamma(3S) quarkonium states are measured through their decays into muon pairs in the CMS detector, in PbPb and pp collisions at the centre-of-mass energy per nucleon pair of 2.76TeV. The data correspond to integrated luminosities of 166 mu b(-1) and 5.4 pb(-1) for PbPb and pp collisions, respectively. Differential production cross sections are reported as functions of gamma rapidity y up to 2.4, and transverse momentum PT up to 20 GeV/c. A strong centrality-dependent suppression is observed in PbPb relative to pp collisions, by factors of up to approximate to 2 and 8, for the gamma(1S) and gamma(2S) states, respectively. No significant dependence of this suppression is observed as a function of y or PT. The gamma(3S) state is not observed in PbPb collisions, which corresponds to a suppression for the centrality-integrated data by at least a factor of approximate to 7 at a 95% confidence level. The observed suppression is in agreement with theoretical scenarios modeling the sequential melting of quarkonium states in a quark gluon plasma. (C) 2017 The Author(s). Published by Elsevier B.V.