A long cycle generator that can work with a auto transfer switch will be several thousand. Sure, you could use even a large KW Lowes or Harbor Freight generator, but those things are like 25% duty cycle are more made to do a few hours worth of work here and there.
You will need a permit in most places around here. Some guys might do it without, but be prepared if they ask you to get one.