text: n must be odd at this point , thus skip the even numbers and iterate only for odd integers
code: for ( $ i = 3 ; $ i <= sqrt ( $ n ) ; $ i += 2 ) { while ( $ n % $ i == 0 ) { $ max = $ i ; $ n = $ n / $ i ; } }