UserManual

cubic_root

Methods of cubic root, residue and related package.

Functions

c_root_p(a, p)

Return the cubic root of 'a' mod prime 'p'. (i.e. x^3 = a (mod p))

>>> c_root_p(1, 13)
[1, 3, 9]

c_residue(a1, b1)

Check whether rational integer a1 is cubic residue modulo prime b1.

>>> c_residue(2, 7)
-1
i.e. x s.t. x^3 = 2 (mod 7) doesn't exist.

c_symbol(a1, a2, b1, b2)

Return the (Jacobi) cubic residue symbol of two Eisenstein Integers (a1+a2*w/b1+b2*w),
where 'w' is a primitive cubic root of unity.
We assume that b1+b2*w is not divisable 1-w.
If b1+b2*w is prime in Z[w], it shows a1+a2w is cubic residue or not.

>>> c_symbol(3, 6, 5, 6)
1

decomposite_p(p)

Decomposite p = 1(mod 3) into its prime factors in Z[w].
We assume 'p' is prime in Z.

>>>decomposite_p(19)
(2, 5)
It means 19 factors 2+5w and 19/(2+5w) in Z[w].

cornacchia(d, p)

Return the solution of x^2 + d * y^2 = p,
where 'p' is a prime and 'd' is an integer such that 0 < d < p.

>>>cornacchia(5, 29)
(3, 2)
It means 3^2 + 5 * 2^2 = 29

Last-modified: 2007-03-06 (Ва) 19:16:03