Number theory

Number theory#

This is a rudimentary example of a number theory calculation.

K.<a> = NumberField(x^2-1000003)

print(K.units())

print(K.class_number())
Hide code cell output
(13588539824738670501937634049552988333821695209017845709174282597854911795746277767704092880505583734383723377832872303678298905016746850960859455536870699535559837726582129371990014046340205582554652629926918221158254563735625476440662077676454369*a + 13588560207533120525571173911036889359175071334492475577050945981112655754066115844008109262853595087091825489817727423098897434120714422347327176783787901807748239401349778788112430877903180798732552113299179825446080855972862801189963185573195143522,)
3

Looks cool, right!