I think with a 4k and 1k resistor, the voltage at the Arduino will be 20V multiplied by 1k divided by 5k (i.e. the value of the two resistors added) which is 4V. To get 5V from 20V, the resistors would be 3k and 1k.
But one of the nice things about using the Arduino for this is that you don't have to worry about getting exact value resistors anyway.
You could use the more common 3.3k and 1k values, test the voltage divider with the battery, measure the actual battery voltage with a multimeter and see what corresponding value you get from analogRead().
Then adjust the value you use in your code to convert from analogRead() result to volts. Something like this ...
const float conversionFactor = 0.xxxx // set this value depending on test results
float batteryVoltage = conversionFactor * analogRead(BATTERY_PIN);
Regards
Ray