Catalysis of the reaction a long-chain aldehyde + O(2) + 2 NADPH = an alkane + formate + H(2)O + 2 NADP(+).