25Khz PWM with digitalWrite...

edsut:
The fan requires a 25Khz input so I can't use the PWM/servo library directly.

Computer fan ?

The 4-pin computer fans I tries worked fine on the default PWM frequency.
But you could have some whining noise at lower speeds. Just try it.
Leo..