@SuppressWarnings("unused")
	private static void CollatzSequence(){
		Scanner keyboard = new Scanner(System.in);
		int n;
		
		System.out.println("Starting number: ");
		n = keyboard.nextInt();
		
		int xPos = 0;
		int steps = 0;
		int largestValue = 0;
		while(n > 1){
			if(n > largestValue)
				largestValue = n;
			if(n % 2 == 0) // even numbers
				n /= 2;
			else 
				n =(3*(n)) + 1;; // odd numbers

			System.out.print(n + "\t");	
			xPos += 1;
			steps += 1;
			if(xPos == 10){
				System.out.print("\n");
				xPos = 0;
			}
		}
	
		if(n == 1)
			System.out.print(1 + "\n\n");

		System.out.println("The largest value was " + largestValue + ".");
		System.out.println("Terminated after " + steps + " steps.");
		keyboard.close();
	}