Makes more sense to me that 4*n here means n+7, which fits the pattern and would make her stop at 12+7=19, one short of 20, because Anglosphere countries teach multiplication tables up to 12.
(I definitely didn't get this until I read the rest of the comments here. This is apparently explained in The Annotated Alice.)
To paraphrase Tom Lehrer: Base 18 is just like base 20... if you're missing two toes!
At least that mathematical interpretation does hold up logically all the way to the punch line (even if the interpretation wasn't obviously intended by Carroll). The following section on the Tea Party is just nonsensical slop.
4*5 = 12 is either wrong or base 18