-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added the Number
is_almost_prime(n,k)
.
Return true if `n` is a k-almost prime (i.e.: true iff `n` is the product of `k` not necessarily distinct primes) Example: say 20.by { .is_almost_prime(1) } # primes say 20.by { .is_almost_prime(2) } # semiprimes say 20.by { .is_almost_prime(3) } # 3-almost primes
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters