Lakatos was originally a Marxist-Leninist. He also was strongly influenced by the Hungarian tradition of mathematical heuristics. The influences have usually been ignored or deemphasized, especially the latter, in accounts of Lakatos' theories. Several of Lakatos' teachers and mentors were involved in theories of mathematical heuristics. Several, but not all, were also Marxists to a greater or lesser extent. Shared themes of the Marxist account of methodology of economics and theses of the Hungarian mathematical heuristics writers are pointed out.