This paper was motivated by a conjecture of Brändén [P. Brändén, Actions on permutations and unimodality of descent polynomials, European J. Combin. 29 (2) (2008) 514–531] about the divisibility of the coefficients in an expansion of generalized Eulerian polynomials, which implies the symmetric and unimodal property of the Eulerian numbers. We show that such a formula with the conjectured property can be derived from the combinatorial theory of continued fractions. We also discuss an analogous expansion for the corresponding formula for derangements and prove a ( p , q ) -analogue of the fact that the (-1)-evaluation of the enumerator polynomials of permutations (resp. derangements) by the number of excedances gives rise to tangent numbers (resp. secant numbers). The ( p , q ) -analogue unifies and generalizes our recent results [H. Shin, J. Zeng, The q -tangent and q -secant numbers via continued fractions, European J. Combin. 31 (7) (2010) 1689–1705] and that of Josuat-Vergès [M. Josuat-Vergés, A q -enumeration of alternating permutations, European J. Combin. 31 (7) (2010) 1892–1906].