Updated 13 October 2026. The retrospective archive date and later additions are documented in the changelog.

In 1843, a paper about an unbuilt calculating machine ended with a table of operations for producing a fraction. The fraction was \(-1/30\). Earlier in the same publication, its annotator suggested that the machine might compose music.

The annotator was Ada, Countess of Lovelace. The machine was Charles Babbage’s Analytical Engine. The connection between the fraction and the music was more interesting than either a calculator or a mechanical composer: a machine could execute organised operations on relationships that had been expressed in a suitable form [[1]].

That is a substantial idea even before anyone awards a medal for being the first programmer. It also gives us something better to do than award the medal: read the argument and run a calculation.


The Notes Explain an Architecture

Lovelace translated Luigi Federico Menabrea’s French account of the Analytical Engine into English and added seven notes, labelled A to G. The translation and notes appeared in Scientific Memoirs in 1843; Menabrea’s original appeared in 1842. Those dates sometimes get collapsed, including in later discussions of her work [[1]].

The engine in the paper is a proposed machine, not a working computer whose abilities had been experimentally demonstrated. Its arithmetic would be performed in the mill, while the store would retain numbers. Punched cards would determine operations and the movement of values. The textile analogy was practical: the Jacquard loom had already shown how cards could direct repeated mechanical actions [[1]].

Lovelace’s notes distinguish the engine from Babbage’s earlier Difference Engine, which was designed to tabulate functions through repeated additions of finite differences. The Analytical Engine proposed a much wider repertoire of arithmetic operations and arrangements for repeating and changing their sequence. What matters is the separation between the quantities being worked on and the instructions determining what happens to them [[1]].

That separation is easy to miss once every machine has become a “computer”. A numerical value alone does not say whether to add it, store it, use it as an exponent, or treat it as an instruction to select a different operation. The architecture and the representation give it a role.

Music Appears in Note A

The often-quoted musical prediction is in Note A, not in the Bernoulli discussion in Note G. Its wording is conditional. If the fundamental relationships of pitched sounds and musical composition could be expressed in a form adapted to the engine’s operations, the engine might compose elaborate pieces [[1]].

She did not supply a music program. Nor did she claim that the engine could listen, prefer one melody to another, or understand a composer’s intention. The move was to identify a possibility opened by representation: the objects of computation need not be quantities whose only meaning is their magnitude.

For a modern illustration, encode a pitch by an integer \(p\), counting semitones from a chosen reference. Transposition by \(s\) semitones becomes

$$ p\longmapsto p+s. $$

Choose inversion around a reference pitch \(c\), and the operation becomes

$$ p\longmapsto 2c-p. $$

Here \(p\), \(s\), and \(c\) are integers in the chosen pitch representation. If \(c=60\) and the sequence is \(60,64,67\), inversion produces \(60,56,53\). A musician may read these as C–E–G and C–A♭–F, respectively, using the familiar MIDI pitch numbering. That convention is our explanatory choice; it is not Lovelace’s notation or a reconstruction of her imagined composition system.

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 proposal identifies the doorway. It does not claim to have furnished every room behind it.

The Fraction Has an Indexing Trap

The mathematical example in Note G computes Bernoulli numbers. To compare it with modern code, we first need to fix the indexing.

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. $$

Thus her \(B_1\) is \(1/6\), not the modern \(-1/2\). The table illustrates the calculation of her \(B_7\), given the preceding three values. That means the modern \(b_8\) [[1]].

An indexing convention is a small detail until it makes a perfectly 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 the recurrence expressed in modern symbols, rather than an exact transcription of her table [[1]].

For \(n=1\), the sum is empty, giving \(b_2=1/6\). For \(n=2\),

$$ b_4=\frac3{10}-2\left(\frac16\right)=-\frac1{30}. $$

Once a number has been calculated, it becomes an input for the next one. That is the organisational point: a sequence of elementary operations can build results whose values need not have been calculated in advance by the person preparing the procedure.

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]].

Her table and accompanying discussion make those lower-level questions visible. They describe which columns hold inputs, working values and results; when a value is retained or cleared; when operations repeat; and how a test changes the subsequent course. A column can hold a result and later supply it as data. The table is an account of changing computational state, not merely the final equation printed sideways [[1]].

An equation identifies a result. An executable procedure must also arrange the journey to it.

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]].

Another discrepancy appears in the expression beside operation 21, identified by Eugene Eric Kim and Betty Alexandra Toole in 1999. The last denominator factor is printed as 3 where it should be 4. The distinction between an instruction and an annotation matters here: the preceding operations build the coefficient with the correct denominator, while the expression describing the result contains 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\). Substituting the printed final 3 gives \(56/3\). That checks the discrepancy without turning it into a claim that the operation sequence necessarily makes the same mistake.

The errors belong in an account of the work. Their presence does not identify who introduced them, and our corrected recurrence is not evidence that every part of the original table has been executed correctly. A publication can be an important account of computation and still need debugging.

Collaboration Does Not Erase an Author

The notes were produced in close collaboration with Babbage. That is evidence about how the work was done, rather than a reason to dismiss it. Thomas Misa’s historical analysis uses their correspondence to distinguish the mathematical formulae from the work of arranging the algorithm and table, and argues for substantial contributions by both. His chapter appeared in 2015; the openly accessible arXiv manuscript was posted in 2023. The latter date is not the date of a new discovery [[3]].

There is a related educational issue. A detailed study by Christopher Hollings, Ursula Martin and Adrian Rice reconstructs Lovelace’s correspondence with Augustus De Morgan. It finds university-level mathematical knowledge alongside gaps and errors, and challenges older assessments that inferred incapacity from those errors. In an 1844 letter to her mother, De Morgan compared her promise with that of a young man preparing for Cambridge. The comparison makes the unequal educational routes visible: Lovelace studied through private instruction and correspondence [[4]].

The same letter also warned that sustained mathematical effort exceeded women’s physical capacity. De Morgan could recognise an individual student’s ability while retaining a general belief that restricted what women should attempt. Those attitudes could coexist [[4]].

Her aristocratic resources and connections matter too. This was not the educational position of women in general. A feminist reading can acknowledge both the gendered route into mathematical work and the class privilege that helped make that route available.

I would rather examine the actual work than make her significance depend on winning every possible definition of “first programmer”. Retrospective priority labels depend on what counts as a program, whether publication matters, and how unfinished machines are treated. Reading an algorithm, checking its mathematics and recognising its author’s contribution require less ceremony.

Originality Is a Different Question

Note G opens with a warning against exaggerating the engine’s powers. Lovelace says it has no pretension to originate anything: it can carry out what people know how to order it to perform. The qualification concerns the Analytical Engine under discussion. It is often expanded into a verdict on every machine that could ever exist [[1]].

The surrounding paragraphs are richer than that slogan. She also proposes that adapting analysis to the engine could bring mathematical relationships into clearer view and influence science indirectly. Preparing something for computation might change what its human investigators see in it [[1]].

In 1950, Alan Turing called one section of Computing Machinery and Intelligence “Lady Lovelace’s Objection”. He distinguished what her evidence supported from the possibility of learning machines. He also challenged the variant claiming that machines cannot surprise us: following a rule does not mean a person has already worked out all 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.

That leaves several questions to separate. Surprise is a relationship between an output and someone’s expectations. Musical composition can mean producing a formally organised sequence of events, or making artistic judgements about a piece. Autonomy concerns how goals and decisions arise and how the system acts on them. None is a substitute measurement for the others.

If a present-day model produces an unexpected melody, the observation would not alone settle its originality, independence, understanding, or rights to authorship. Those require explicit criteria and evidence about that system. Neither an 1843 statement nor Turing’s reply constitutes a contemporary evaluation of language models.

The Representation Opens the Possibility

Lovelace’s music suggestion and her Bernoulli calculation belong together. The calculation shows how operations can be organised to produce a result. The suggestion asks what else could be represented so that organised operations would have meaning there too.

A piano note is not a fraction. Both can enter a computation through a representation, and the representation determines which relationships survive the journey. That is why the choices of encoding and operation matter, just as they do in the strawberry counting problem.

The engine in the paper never performed the demonstration for its readers. Its annotator nevertheless explained a way to think about its possibilities and its limits. The fraction can be checked. The larger idea can be read.

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.