n must be odd at this point So we skip one element ( i = i + 2 )
for ( $ i = 3 ; $ i * $ i <= $ n ; $ i = $ i + 2 ) { while ( $ n % $ i == 0 ) { $ n = ( int ) ( $ n / $ i ) ; array_push ( $ P , $ i ) ; } }