Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a method or a function to generate integers that are only divisible by 3?

share|improve this question
11  
If you mean by $3$ and no other prime, then $3^n$. –  Alex Becker Jan 6 '13 at 4:48
2  
@RahulNarain $3*4=12$, $12 mod2 = 0$ –  Babiker Jan 6 '13 at 4:51
3  
What do you mean? If $n$ is an integer divisible by $3$, then we have another integer $n/3$ which also divides $n$. So I guess the only solution to your problem is the constant function $3$. –  Hui Yu Jan 6 '13 at 4:55
1  
@AlexBecker Thanks, I'll be glad to accept your answer. –  Babiker Jan 6 '13 at 4:55
2  
Wow...I just remembered the Fundamental Theorem of Arithmetic and realized how big of a brain fart that was. –  Babiker Jan 6 '13 at 4:57

2 Answers 2

up vote 4 down vote accepted

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:

 1. Let x = 3 and S be empty.
 2. Add x and -x to S.
 3. Multiply x by 3 and set x equal to that.
 4. Go to 2.
share|improve this answer

There is no integer that is only divisible by $3$. Every integer is always divisible by $1$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.