Enumeration of totally real fields: PHC interface

AUTHORS:

  • John Voight (2007-09-19): initial version

sage.rings.number_field.totallyreal_phc.coefficients_to_power_sums(n, m, a)[source]

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.

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]
>>> from sage.all import *
>>> from sage.rings.number_field.totallyreal_phc import coefficients_to_power_sums
>>> coefficients_to_power_sums(Integer(3),Integer(2),[Integer(1),Integer(5),Integer(7)])
[3, -7, 39]
>>> coefficients_to_power_sums(Integer(5),Integer(4),[Integer(1),Integer(5),Integer(7),Integer(9),Integer(8)])
[5, -8, 46, -317, 2158]
from sage.rings.number_field.totallyreal_phc import coefficients_to_power_sums
coefficients_to_power_sums(3,2,[1,5,7])
coefficients_to_power_sums(5,4,[1,5,7,9,8])