How to do an "if" block in Sage?
I am trying to do an if block in sage. For example, I have code:
for n in range(7): if gcd(n,3)==3: n=n/3; n=n+1; print(n)
This "should" only add one when n is divisible by 3, but seems to do this all the time. Any ideas?