What Lovelace Thought a Computer Could Do
Abstract
Ada Lovelace’s 1843 notes connect a calculation of Bernoulli numbers to a much larger idea: operations can act on represented relationships, including musical ones. Her account also draws a boundary around machine originality that remains worth reading carefully.
Contents
Updated 13 October 2026. The retrospective archive date and later additions are documented in the changelog.
The fraction ($-1/30$) was the last entry in a table of operations for a calculating machine, published in 1843. The machine was never built. Earlier in the same publication, the annotator had speculated that such a machine could be used to compose music.
Ada, Countess of Lovelace, was the annotator, and the machine was Charles Babbage’s Analytical Engine. The link between the fraction and the music was of greater interest than a calculator or a mechanical composer [[1]]. The point is that a machine can apply organised operations to relationships, provided they are expressed in a suitable form.
It is a good idea, even if you don’t count Lovelace as the world’s first programmer. It is also a good excuse to read her argument, and perform a calculation, instead of awarding a dubious medal.
The Notes Explain an Architecture
In 1843, Scientific Memoirs published an English translation of a French article about the Analytical Engine, by Luigi Federico Menabrea. The translator, Ada Lovelace, added seven notes to the translation, labelled A-G. (The original article by Menabrea was published in 1842; these dates are sometimes confused, including in later articles about Lovelace’s work) [[1]].
The paper describes a proposed machine, not a working computer whose abilities had been experimentally demonstrated. Numbers would be calculated by a part called the mill, and stored in a part called, the store. Punched cards would determine the operations to be performed and the movement of values between the mill and the store. The analogy with the Jacquard loom was convenient, because it had already been demonstrated that punched cards could be used to repeat a sequence of mechanical actions [[1]].
Lovelace’s notes distinguish the engine from Babbage’s previous Difference Engine, which was designed to tabulate functions by repeated addition of finite differences. The Analytical Engine was designed to perform a much wider range of arithmetic operations, and had mechanisms to repeat operations and alter their sequence. The key distinction is the separation of the quantities being operated on from the instructions that determine what operations are performed on them [[1]].
This is easy to forget when every machine around you is a “computer”. A numerical value in a store does not determine whether it is to be added to something, stored somewhere, used as an exponent or treated as an instruction to perform a different operation. That depends on the architecture of the machine and the way that numbers are represented.
Music Appears in Note A
The often-quoted prediction about music is in Note A rather than in her discussion of Bernoulli Numbers in Note G. It is phrased conditionally: if pitched sounds and musical composition, in their fundamental relations, could be put in a form suited to the engine’s operations, it might compose elaborate pieces [[1]].
She did not provide a program for composing music. Nor did she claim that the engine would be able to listen to music, prefer one melody to another or understand the intention of a composer. What she did was to identify a possibility that representation opens up: the objects of computation need not be quantities with no meaning beyond their magnitude.
For example, we can encode a pitch by an integer ($p$), counting semitones relative to some reference note. Then transposition by ($s$) semitones can be calculated by the formula
$$ p\longmapsto p+s. $$for any pitch (p) and transposition (s). If we choose a reference pitch ($c$), then inversion can also be calculated as
$$ p\longmapsto 2c-p. $$where ($p$), ($s$) and ($c$) are all integers, in our chosen system of pitch representation. For example, if ($c=60$), inversion of the sequence of pitches ($60,64,67$), produces the sequence ($60,56,53$). A musician might read these as the notes C–E–G and C–A♭–F, but that is just a convention. The MIDI note numbering system is not Lovelace’s notation, nor a reconstruction of whatever system she might have imagined.
Arithmetic has preserved a defined relationship between pitches. It has not determined their durations, instrumentation, phrasing, or whether this is an interesting musical event. A later example appears in the Nørgård infinity-series article: a rule generates related material, while composition includes choices about how that material becomes a piece.
Lovelace’s suggestion identifies a doorway to such possibilities. It does not claim to have furnished every room behind it.
The Fraction Has an Indexing Trap
The mathematical example in Note G of the 1843 paper is a calculation of Bernoulli numbers. We need to fix an indexing convention for Bernoulli numbers (b_m), before we can compare it with modern computer programs.
Using \(b_m\) for the modern numbers, define them by the formal power series
$$ \frac{x}{e^x-1}=\sum_{m=0}^{\infty}b_m\frac{x^m}{m!}. $$The apparent singularity at \(x=0\) is removable. Analytically the series converges for \(|x|<2\pi\); for the coefficient calculations below it is enough to work formally, matching equal powers. The convention gives \(b_0=1\), \(b_1=-1/2\), and
$$ b_2=\frac16,\quad b_4=-\frac1{30},\quad b_6=\frac1{42},\quad b_8=-\frac1{30}. $$All odd-indexed numbers beyond \(b_1\) vanish [[2]].
Lovelace uses a different historical indexing for the even terms. Her \(B_1\), \(B_3\), \(B_5\), and \(B_7\) correspond to our \(b_2\), \(b_4\), \(b_6\), and \(b_8\). In general,
$$ B_{2n-1}^{\text{Note G}}=b_{2n},\qquad n\geq1. $$The table in Note G shows how to calculate her ($B_7$) (given the preceding three values $B_1$, B_3, B_5). That is the modern ($b_8$) [[1]]. So, be careful when comparing with other sources: her (B_1) is ($1/6$), not the modern ($-1/2$).
An indexing convention is a small detail, until it makes a correct calculation look wrong.
A Recurrence Turns Previous Results Into Inputs
The method behind Note G’s equation (8) follows from multiplying the defining series by \((e^x-1)/x\). The product is one. Every positive-power coefficient must therefore vanish. Rewriting the coefficient of \(x^{2n}\) in modern notation gives
$$ 0=-\frac{2n-1}{2(2n+1)} +\sum_{k=1}^{n} \frac{\binom{2n}{2k}}{2n-2k+1}\,b_{2k}. $$Here \(n\) counts the even Bernoulli numbers, \(k\) labels a term in the sum, and \(\binom{2n}{2k}\) is a binomial coefficient. The coefficient of \(b_{2n}\), at \(k=n\), is one. Moving the other terms gives
$$ b_{2n}=\frac{2n-1}{2(2n+1)} -\sum_{k=1}^{n-1} \frac{\binom{2n}{2k}}{2n-2k+1}\,b_{2k}. $$This is a recurrence relation for Bernoulli numbers. It is not an exact transcription of the formula described in Note G, but an equivalent in modern notation [[1]].
For ($n=1$), the sum is empty, and the formula gives (b_2 = 1/6). For ($n=2$),
$$ b_4=\frac3{10}-2\left(\frac16\right)=-\frac1{30}. $$When a Bernoulli number has been calculated, it becomes an input to the calculation of a later number. This is the key point: a sequence of operations can be organised so that the final result does not need to be calculated in advance by the person preparing the sequence of operations.
For the example in the historical table, \(n=4\), the coefficients are \(4\), \(14\), and \(28/3\). The complete calculation is
$$ \begin{aligned} b_8&=\frac7{18} -4\left(\frac16\right) -14\left(-\frac1{30}\right) -\frac{28}{3}\left(\frac1{42}\right)\\ &=\frac7{18}-\frac23+\frac7{15}-\frac29 =-\frac1{30}. \end{aligned} $$The fraction in the opening has now earned its place.
Running the Mathematics Is Not Running the Engine
Here is a compact Python implementation. It uses only the standard library;
Python 3.8 or later supplies math.comb. Fraction keeps every intermediate
value rational and exact.
from fractions import Fraction
from math import comb
def note_g_even(count):
even = []
for n in range(1, count + 1):
value = Fraction(2*n - 1, 2*(2*n + 1))
for k in range(1, n):
coefficient = Fraction(comb(2*n, 2*k), 2*n - 2*k + 1)
value -= coefficient * even[k - 1]
even.append(value)
return even
print(note_g_even(4))
The output represents \(1/6,-1/30,1/42,-1/30\). Verification of this implementation also checks ten even values through \(b_{20}\) against a separate full-index recurrence and reference values, then uses the numbers in 200 exact comparisons with directly calculated sums of powers.
The implementation preserves the dependency of each result on earlier ones.
It does not reproduce the engine’s columns, card movements, elementary
operation schedule, or mechanical timing. comb packages several arithmetic
operations into one function call. Exact rational storage is another change:
Note G explicitly describes fractional results appearing as decimal
fractions. Our calculation avoids rounding; it cannot establish the numerical
behaviour of a finite-precision mechanical implementation [[1]].
The table and the description of the operations in Note G are explicit about many of the lower-level questions: Which columns hold inputs, working values and results? When is a value retained or cleared? When does a sequence of operations repeat? How does a test change the subsequent course of operations? A value in a column can be a result, and later be used as data. In this sense the table is an account of a calculation that involves changing computational state, not merely the final equation (printed sideways) [[1]].
An equation can identify a result, but an executable procedure must also describe the journey to get there.
The Printed Table Can Be Wrong in Two Ways
Reading the table closely also reveals discrepancies. Operation 4 prints the division as \(V_5/V_4\), although its stated result requires \(V_4/V_5\). Here \(V_4=2n-1\) and \(V_5=2n+1\). For the worked case \(n=4\), the required quotient is \(7/9\); following the printed order gives \(9/7\) [[1]].
Eugene Eric Kim and Betty Alexandra Toole (1999) identified another discrepancy in the expression printed beside operation 21: the last factor in the denominator should be 4, not 3. It is important to distinguish between an operation that is an instruction, and an expression that is just an annotation to describe the result of an instruction. The sequence of operations up to 21 has been constructing the coefficient with the correct denominator, but the expression describing the result has the wrong factor [[1]], [[6]].
For ($n=4$), that coefficient should be
$$ \frac{8\cdot7\cdot6}{2\cdot3\cdot4}=14, $$as in our calculation of ($b_8$) above. If you substitute the final 3 (as printed in the table) you get $56/3$. So this is a way to check the discrepancy, without making the stronger claim that the sequence of operations must also make the same mistake.
These are the sort of errors that should be described in an account of the work. But we do not know who made the error. We also do not have evidence that every part of the original table has been executed correctly (our corrected recurrence relation is not a faithful transcription). An important account of a computation can still need debugging.
Collaboration Does Not Erase an Author
The notes by Lovelace were written in close collaboration with Babbage. This is important evidence about the way the work was done, but it is not a reason to dismiss it. Thomas Misa has performed a detailed analysis of the work (and the correspondence between Babbage and Lovelace). He distinguishes the mathematical formulae from the work of arranging the algorithm and the table, and argues that there is evidence for substantial contributions by both Babbage and Lovelace. Misa’s chapter was published in 2015, but an openly accessible manuscript (arXiv) was posted in 2023 (not the date of a new discovery) [[3]].
There is a related issue that has an educational angle. A detailed study of Lovelace’s mathematical correspondence (with Augustus De Morgan in particular) by Christopher Hollings, Ursula Martin and Adrian Rice, provides evidence of university-level mathematical knowledge, alongside gaps and errors. The authors use this evidence to challenge older assessments of her work, where errors were taken as evidence of incapacity. In an 1844 letter to her mother, De Morgan compares the “promise” and ability of Ada to that of a young man preparing for entrance to Cambridge. The comparison is interesting, because the educational routes available to a young man and a young woman were so different. Lovelace’s education was by private instruction and correspondence [[4]].
The same letter also contains a warning that sustained work at mathematics would exceed the physical capacity of women. De Morgan could recognise the ability of an individual student, and still hold a general belief that limited what women should attempt [[4]].
Of course, Ada Lovelace was also an aristocrat with resources and connections that were not available to women in general. A feminist account of her work can acknowledge the gendered route into mathematical work, and the privilege of class that helped make that route available.
I prefer to examine the work itself, rather than make the significance of her work depend on winning every possible definition of “first programmer”. Labels of priority given in retrospect depend on what counts as a program, on whether publication matters, and on how unfinished machines are to be treated. Reading an algorithm, checking the mathematics and recognising the contribution of its author need less ceremony.
Originality Is a Different Question
Note G begins with an admonition to the reader to avoid exaggerating the powers of the engine. It can perform what people know how to instruct it to do, and Lovelace says that it has no pretension to originate anything.
This statement is about the Analytical Engine under discussion in the 1843 paper. It is often quoted as if it is a verdict on every machine that could ever exist [[1]].
The other paragraphs in Note G are more subtle than this oft-quoted line. She also proposes that analysis adapted to the engine could make mathematical relationships clearer, and could influence science indirectly. There is a suggestion here that the process of preparing something for computation might affect what its human investigators see in it [[1]].
In 1950, Alan Turing named a section of his paper Computing Machinery and Intelligence “Lady Lovelace’s Objection”. Turing carefully distinguishes what her evidence supports (in the context of the Analytical Engine) from the possibility of “learning machines”. He also challenges the variant that says machines cannot surprise us. To follow a rule does not mean that a person has already worked out all of its consequences [[5]].
Our Bernoulli calculation supplies a modest illustration. Knowing the recurrence does not mean knowing, without doing the work, that \(b_{12}=-691/2730\). Computing an implication and stating its rule are different accomplishments. But an unfamiliar fraction does not by itself establish a machine’s creative intentions.
The question of “originality” is a collection of several different questions:
Surprise is a relation between an output of a machine and the expectations of a person. Musical composition might mean the production of a formally organised sequence of musical events, or it might involve artistic judgements about a piece. The “autonomy” of a system is a statement about the way its goals and decisions are determined (and the way it acts on them).
None of these is a “substitute test” for the others.
So, if a present-day machine produces a melody that surprises you, that observation alone would not settle the originality, independence, understanding or rights to authorship (or any other claim that requires explicit criteria and evidence about that system). Neither the 1843 note nor Turing’s 1950 reply to it is a contemporary evaluation of language models.
The Representation Opens the Possibility
Lovelace’s suggestion about music and her calculation of Bernoulli numbers are related. The calculation is a demonstration of how operations can be organised to produce a result. The suggestion is a question: what else could be represented, so that organised operations could be meaningful?
A note on a piano is not a fraction. But they can both enter a computation (if they are encoded in a suitable representation), and the representation determines which relationships are preserved. This is why the choice of encoding and of operation matters, as in the strawberry counting problem.
The Analytical Engine in the 1843 paper never performed the demonstration for its intended audience. But her notes explain a way to think about its possibilities and its limits. Check the fraction, read the larger idea.
Primary texts, historical scholarship and exact-rational calculations checked through 2026-10-13. The code demonstrates Note G’s mathematical recurrence, not an Analytical Engine simulation.
References
[1] Menabrea, L. F. (1843). Sketch of the Analytical Engine invented by Charles Babbage, Esq. Translated, with notes A–G, by A. A. Lovelace. Scientific Memoirs, 3, 666–731. French original published in 1842. Full text and images, especially notes A, D and G; Note G equations (4)–(9) and the appended table.
[2] Dilcher, K. Bernoulli and Euler polynomials, §24.2, definitions and generating functions, equation 24.2.1 and table 24.2.1. NIST Digital Library of Mathematical Functions. Definitions and values.
[3] Misa, T. J. (2015). Charles Babbage, Ada Lovelace, and the Bernoulli numbers. In R. Hammerman and A. L. Russell (eds.), Ada’s Legacy: Cultures of Computing from the Victorian to the Digital Age, pp. 11–31. ACM Books / Morgan & Claypool. DOI: 10.1145/2809523.2809527. Author’s manuscript, deposited in 2023.
[4] Hollings, C., Martin, U., and Rice, A. (2017). The Lovelace–De Morgan mathematical correspondence: A critical re-appraisal. Historia Mathematica, 44(3), 202–231. DOI: 10.1016/j.hm.2017.04.001. Open-access version of record, especially §§1–2 and 6.
[5] Turing, A. M. (1950). Computing machinery and intelligence. Mind, LIX(236), 433–460. DOI: 10.1093/mind/LIX.236.433. Full-text transcription, §6(6), “Lady Lovelace’s Objection”, and §7, “Learning Machines”.
[6] Kim, E. E., and Toole, B. A. (1999). Ada and the first computer. Scientific American, 280(5), 76–81. Original magazine pages, especially the table commentary on p. 79. The distinction between the printed result and the operations was checked against the original Note G table.
Changelog
- 2026-10-13 — Retrospective Archive and Research Update: Assigned 10 December 2024 as the archive date, beside the blog’s earlier AI and music discussion. This version was prepared and checked in October 2026; the archive date does not claim that it was online in 2024. The dated sources all predate that archive date. The Nørgård cross-reference points to a later article dated 4 June 2026 and belongs to this update. The original-table corrections and exact-arithmetic checks below likewise record the actual review date.
- 2026-10-13 — Original Table Review: Checked the reversed division in operation 4 and the incorrect result annotation beside operation 21; distinguished both from the modern recurrence implemented here.
- 2026-10-13 — Research and Calculation Review: Checked the original notes, distinguished historical and modern Bernoulli indexing, and verified the recurrence with exact arithmetic. Separated the mathematical demonstration from an engine simulation and distinguished symbolic composition, surprise and autonomy.
AI-likeness scores (0–1) · Mesmer 0.10 · MELD 0.49 · Open Pangram 0.03