In 1843 Ada Lovelace published her translation of Luigi Menabrea’s account of Charles Babbage’s Analytical Engine, together with seven explanatory notes of her own labeled A through G. The last and longest of these, Note G, contains a detailed procedure for the engine to compute the Bernoulli numbers, a sequence of rational numbers that appears throughout mathematical analysis.
The note presents the computation as a structured sequence of operations laid out for the machine, including a worked diagram showing the steps and the intermediate values. Because it specifies an explicit, mechanical procedure intended to be carried out by a programmable machine rather than by a human, Note G is widely regarded as the first published example of a computer program.
It is worth stating this carefully. The Analytical Engine was never built, so the procedure was never executed on the hardware it targeted, and historians describe Note G as the first published algorithm “regarded as” a computer program rather than as an undisputed first. What is not in dispute is that the note demonstrates, in concrete detail, how a general-purpose machine could be instructed to carry out a nontrivial calculation.
The notes, including Note G, appeared in the English-language translation credited to “the Translator ADA AUGUSTA, COUNTESS OF LOVELACE.” The work helped establish the idea that a machine could follow a written procedure to produce a mathematical result automatically.