def METHOD_NAME(n, m, a):
    r"""
    Take the list ``a``, representing a list of initial coefficients of
    a (monic) polynomial of degree `n`, and return the power sums
    of the roots of `f` up to `(m-1)`-th powers.
    INPUT:
    - ``n`` -- integer, the degree
    - ``a`` -- list of integers, the coefficients
    OUTPUT:
    list of integers.
    .. NOTE::
        This uses Newton's relations, which are classical.
    AUTHORS:
    - John Voight (2007-09-19)
    EXAMPLES::
        sage: from sage.rings.number_field.totallyreal_phc import coefficients_to_power_sums
        sage: coefficients_to_power_sums(3,2,[1,5,7])
        [3, -7, 39]
        sage: coefficients_to_power_sums(5,4,[1,5,7,9,8])
        [5, -8, 46, -317, 2158]
    """
    S = [n] + [0]*m
    for k in range(1,m+1):
        S[k] = -sum([a[n-i]*S[k-i] for i in range(1,k)])-k*a[n-k]
    return S