I think you're looking for the large formula at the top here: https://en.wikipedia.org/wiki/General_number_field_sieve

Reference to a scientific paper is given: https://www.ams.org/notices/199612/pomerance.pdf