  The basic aspects of both Boltzmann-Gibbs (BG) and nonextensive statistical
mechanics can be seen through three different stages. First, the proposal of an
entropic functional
  ($S_{BG} =-k\sum_i p_i \ln p_i$ for the BG formalism) with the appropriate
constraints
  ($\sum_i p_i=1$ and $\sum_i p_i E_i = U$ for the BG canonical ensemble).
Second, through optimization, the equilibrium or stationary-state distribution
  ($p_i = e^{-\beta E_i}/Z_{BG}$ with $Z_{BG}=\sum_j e^{-\beta E_j}$ for BG).
Third, the connection to thermodynamics (e.g., $F_{BG}= -\frac{1}{\beta}\ln
Z_{BG}$ and
  $U_{BG}=-\frac{\partial}{\partial \beta} \ln Z_{BG}$). Assuming temperature
fluctuations,
  Beck and Cohen recently proposed a generalized Boltzmann factor
  $B(E) = \int_0^\infty d\beta f(\beta) e^{-\beta E}$. This corresponds to the
second stage above described. In this letter we solve the corresponding first
stage, i.e., we present an entropic functional and its associated constraints
which lead precisely to
  $B(E)$. We illustrate with all six admissible examples given by Beck and
Cohen.
