Gate and pull-down resistor values for MOSFET and Arduino Nano

Thanks everybody for the input! I've tried using different frequencies 25kHz, 31.7kHz, 3.9kHz, 980Hz, 490 Hz, 245Hz, 122Hz, 30Hz, but none did the trick neither with TIP120 nor with IRF540N. The only difference was that at 25 and 31 kHz the fan's motor makes a lower frequency (audible) noise and writing values lower than 310 to PWM pin opens the transistor completely.
Here's the code for reference (source):

int fanSpeed = 320;
int step = 1;

// PWM output @ 25 kHz, only on pins 9 and 10.
// Output value should be between 0 and 320, inclusive.
void analogWrite25k(int pin, int value)
{
    OCR1A = value;
}

void setup()
{
    // Configure Timer 1 for PWM @ 25 kHz.
    TCCR1A = 0;           // undo the configuration done by...
    TCCR1B = 0;           // ...the Arduino core library
    TCNT1  = 0;           // reset timer
    TCCR1A = _BV(COM1A1)  // non-inverted PWM on ch. A
           | _BV(COM1B1)  // same on ch; B
           | _BV(WGM11);  // mode 10: ph. correct PWM, TOP = ICR1
    TCCR1B = _BV(WGM13)   // ditto
           | _BV(CS10);   // prescaler = 1
    ICR1   = 320;         // TOP = 320

    // Set the PWM pins as output.
    pinMode( 9, OUTPUT);
}

void loop()
{
    analogWrite25k(9, fanSpeed);
    if ((fanSpeed - step) < 0) {
      fanSpeed = 320;
    } else {
      fanSpeed -= step;
    }
    delay(1000);
}

And just to make sure we're on the same page: I'm PWM'ing the fan using transistor on low-side, fan has 3-pin (3rd pin is tach).