Snippets created by d95danb

  • Prime testing

    Simple check if a number is prime. See also http://fssnip.net/2w.

    3 people like this

    Posted: 12 years ago by d95danb

  • Integer factorization

    Return a list of the prime factors for a natural number using trial division and a prime sieve. Ref: http://en.wikipedia.org/wiki/Trial_division Ref: http://fssnip.net/7D

    0 people like this

    Posted: 12 years ago by d95danb