Is there a method or a function to generate integers that are only divisible by 3?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Every integer is also divisible by $1$, so the collection is empty.
If you're OK with having $1$ as a divisor, every integer is also divisible by itself, so it's just $3$.
If you mean the set of integers for which $3$ is the only prime divisor then you may use the following algorithm:
There is no integer that is only divisible by $3$. Every integer is always divisible by $1$.