So what’s the answer? Most Nikon cameras have the option of an automatic cleaning cycle, which can go a long way towards keeping the image sensor neat and tidy. That’s true of recent DSLRs but ...
The Nikon D3100's startup ... startup and shutdown by default. (Sensor cleaning is preempted by the shutter release, and likely continues briefly after the camera is shut off.) ...
The Nikon D5100's startup ... startup and shutdown by default. (Sensor cleaning is preempted by the shutter release, and likely continues briefly after the camera is shut off.) ...