Snippets created by d95danb

  • Prime testing

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

    2 people like this

    Posted: 6 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: 6 years ago by d95danb