Why is the front part of the engine not painted?
The engine inlet lip is bare metal to facilitate anti-icing. The area is heated from within using hot engine bleed air.

This partial schematic (from Boeing AERO QTR_01.12) shows the engine anti-ice valve, which controls the air supply to the inlet lip:


Interesting side note: Even the 787 "no-bleed" system architecture uses bleed air for engine anti-ice.