Yes, six times nine equals fifty-four. Yes, six times nine equals 42 in base thirteen, and we don't want to know about the implications that has on the number of fingers cavemen must have had.
Douglas has himself said:
Of course, this is not strictly true, as Douglas was using 42 before he wrote the Guide and admits in an interview in Douglas Adams' Guide To The Hitchhiker's Guide To The Galaxy that John Cleese had identified it as a funny number before he had.
(As an aside, Lewis Carroll was obsessed with the number 42).