Handle prime factor 2 explicitly so that can optimally handle other prime factors .
if ( n % 2 == 0 ) : NEW_LINE INDENT concatenate += "2" NEW_LINE while ( n % 2 == 0 ) : NEW_LINE INDENT n = int ( n / 2 ) NEW_LINE DEDENT DEDENT