Which setup will give you greater energy density i.e. more energy per weight, by energy I mean kinetic output of electric engine:
high performance lithium batteries + electric engine or fuel tank, heat engine, generator and electric engine?
That question can only be answered correctly if the size constraints are known.
In other words, a vehicle with a gasoline powered motor/generator that is size constrained such that it only can carry 1 gallon of gasoline will probably be beaten by the all-electric car. Conversely, if there is a lot of space available, the far greater energy density of gasoline will certainly win out, even taking into consideration the size and weight of the motor/generator.
Do you count the oxygen the gasoline needs in your calculation?
No.
Beowulff keyed into the main issue. If you’re looking at a tiny helicopter that fits into the palm of your hand, you will get more flight time out of a Li battery than a gasoline engine/generator system. There’s a minimum size for the engine/generator system that makes it unsuitable for small applications.
Move up to the size of a car. Once you account for the engine/generator, adding weight means adding gasoline, which beats the pants off of adding batteries in terms of energy density. Let’s say the e/g costs you 500lbs. That means you get 500lbs of battery power before a single gallon of gasoline. Once you start adding gasoline, it’s going to trip over pretty quickly to that side of the equation.