Finding the prime factors of limit to calculate it 's  euler totient function
primes = [ ] NEW_LINE for i in range ( 2 , limit + 1 ) : NEW_LINE INDENT if i * i > limit : NEW_LINE INDENT break NEW_LINE DEDENT if ( limit % i == 0 ) : NEW_LINE INDENT while ( limit % i == 0 ) : NEW_LINE INDENT limit //= i NEW_LINE DEDENT primes . append ( i ) NEW_LINE DEDENT DEDENT if ( limit >= 2 ) : NEW_LINE INDENT primes . append ( limit ) NEW_LINE DEDENT