private int largestPrimeFactor_v2(long number)
	{
		int factor;
		int lastFactor;
		long maxFactor;
		if( number % 2 == 0)
		{
			lastFactor = 2;
			number = number/2;
			while(number % 2 == 0)
				number = number / 2;
		}
		else 
		{
			lastFactor = 1;
		}
		
		factor = 3;
		maxFactor = Math.round(Math.sqrt(number));
		while (number > 1 && factor <= maxFactor)
		{
			if(number % factor == 0)
			{
				number = number / factor;
				lastFactor = factor;
				while(number % factor == 0)
				{
					number = number / factor;
				}
				maxFactor = Math.round(Math.sqrt(number));
			}
			factor += 2;
		}
		
		if(number == 1)
		{
			return (int) lastFactor;
		}
		else 
		{
			return (int) number;
		}
	}