I define non-Hamming number as in: \$n\$ is non-Hamming number if and only if it satisfies following two conditions:
- \$n\$ is positive integer, and
- \$n\$ does not divide powers of 60 evenly; i.e. \$60^m\mod n\neq0\$ for all positive integer \$m\$.
Make a program, a function, or a subroutine that does one of these:
- takes no input to print/return/generate a list of non-Hamming numbers infinitely, or
- takes a positive integer \$n\$ as input to print/return/generate \$n\$th non-Hamming number (can be either 0-indexed or 1-indexed), or
- takes a positive integer \$n\$ as input to print/return/generate a list of first \$n\$ non-Hamming numbers.
takes a positive integer \$n\$ to print/return/generate non-Hamming number until \$n\$ (suggested by @Wasif, can be inclusive or not; i.e. non-Hamming numbers that are either \$<n\$ or \$\leq n\$). abolished by @rak1507.
This example shows how program/function/subroutine that does 3rd task should work:
7, 11, 13, 14, 17
- I/O method is done by your desired format.
- If you are answering one of 2nd or 3rd task, you can assume that input is a non-negative integer.
- No external resources.
- Standard loopholes apply.
- If your program/function/subroutine fails to output huge non-Hamming numbers because of overflow (or similar boundary) but is theotically valid, it is acceptable.
- Shortest code in bytes wins. However, if someone have won entire of this post, you can still try to win among languages and tasks.
It's actually A279622.