4000w, 15a is 260v? Nah, that can't be right.
Assuming your pump is 120v and you intend on running it off a 20a breaker on
the generator, you will need #12 wire.
If you run it off the 120/240 outlet, you need whatever cable is appropriate
to the breaker; #10 for 30a.
Sorry, but I don't know the requirement for burying cable. It has been said
to be 18" earlier in this newsgroup, but I am just repeating what I read.