How to express accumulation expression in CVX

If the denominator is always positive, you can use inv_pos(1+p*a). I have no idea how, if at all, that relates to the formulas in your first post (for which is it not clear what is input data and what are optimization variables, nor which superscripts are powers as opposed to being index superscripts).

You should carefully read the CVX Users’ Guide. http://cvxr.com/cvx/doc/ as well as Why isn't CVX accepting my model? READ THIS FIRST! . In particular, you should first prove that your optimizartion problem is convex before trying to use CVX to solve it.