fermat_factor: Computes the factorization of an integer n by Fermat's...

Description Usage Arguments Value References Examples

Description

Fermat's factorization theorem redefines a composite number n as the difference of squares:

n = a^2 - b^2

Which can also be written as:

n = (a + b)(a - b)

Usage

1

Arguments

n

Integer to be factored into product of smaller integers.

Value

vector of length two containing factors of integers

References

Barnes, C. (2004). Integer Factorization Algorithms (1st ed.). Corvallis, OR: Department of Physics, Oregon State University. Fermat's factorization method. (2017, January 31). In Wikipedia, The Free Encyclopedia. From https://en.wikipedia.org/w/index.php?title=Fermat

Examples

1
2

aschleg/numberr documentation built on May 14, 2019, 10:31 a.m.