Java, 165, 156, 154,134,131,129,128128,126 (verbose languages need some love too)
class a{public static void main(String[]a){for(int x=Integerx=Short.valueOf(a[0]),y=0;x>1;x=x%2<1?x/2:x*3+1,System.out.println(++y));}} All is done inside the for
for(int x=Integerx=Short.valueOf(a[0]),y=0;x>1;System.out.println(y++),x=x%2<1y=0;x>1;x=x%2<1?x/2:x*3+1,System.out.println(++y);) That's freaking beautiful man. Thanks to Pater Taylor!!!, and the idea of using a for loop was stolen from ugoren
Today I learned that:
Integer.valueOf(String): Returns an Integer object holding the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the parseInt(java.lang.String) method. The result is an Integer object that represents the integer value specified by the string.
From: http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#valueOf%28java.lang.String%29replaced Integer for Short.