Picat, 41 bytes
f(1)=0.
f(N)=[f(N/>I)+I+1:I in 2..5].min.
Same approach as xnor's Python answer: recurses through the cases of ctrl+A C V{1,4}
to get at least N characters as a result.
With the help of table
in the header section, it computes all test cases almost instantly. Thanks to the />
operator which does ceil-ed integer division, all intermediate arguments are integers without any complications, and we can simply pattern-match the 1 as the base case.
Bitwise not operator ~
exists in Picat, but it doesn't like putting the two symbols -~
side-by-side, so the usual -~
trick does not save any bytes.