Marx and Mathematics

I was rather idly browsing the shelves of one of the University of Melbourne's libraries, when a volume caught my eye. It was entitled Les manuscrits mathematiques de Marx (Marx's mathematical manuscripts).  My curiosity was aroused and I readily learned that the Marx in question was indeed Karl Marx, the Karl Marx, advocate of the overthrow of capitalism. It was a complete surprise to me that Marx had had any interest at all in mathematics, let alone written on the subject.  However he did indeed write a number of papers on aspects of mathematics, although none of these writings were published in his lifetime; in fact he may never even have had publication in mind when he prepared them.