Assume the following setup:
Input -> First ----------> Second ----------> etc. Air heatpump hot air heatpump hot air T_0 | T_h1>T_0 | T_h2>T_h1 v v cold air cold air T_c0<T_0 T_c1<T_h1
Ts are temperatures; the darker the red, the warmer. The barriers between the areas are isolating materials. The throughput is smaller for nested pumps so that the most inner, hottest area is quite small and heated up slowly in comparison to the out ones. The heat pumps would operate with different fluids suited for the temperature differences. The output temperature (after
etc.) is limited by the availability of the right fluid and the construction of a pump which can withstand the heat.
The only question to decide whether such a machine could operate efficiently, i.e. provide more energy than the pumps consume, is how much do the heat pumps consume? I'm searching for figures to estimate the consumption of thermal heat pumps (let's assume they're electric).
I'm pretty sure that it's not a perpetuum mobile of the second kind because the system is fed with the energy taken out of the cold air which leaves the first (left) heat pump.
The figures for the energy consumption would show whether such a machine can be constructed and provide (heat) energy rather than consume more than it provides. Example use cases would be geo-/climate-engineering and production of electricity or heat for heavy engineering.