A 2X4 is actually 1 1/2 X 3 1/2! The pilot hole needs to be about half(or smaller) than the size of bolt you buy. It just needs to be big enough that the tip of the lag screw can start in the 2X4.
If you are sistering up your 2X4's like what was described in one of your other posts, then your posts will now be 3" thick. Now you want to get bolts to go in the tree at least 3" so get 6" lag screws. They are big with a pointed end and a bolt head on the other. Drill a pilot hole about 1/2...