Corresponding with Gottfried Leibniz1 about his method of infinite series in 1677, Isaac Newton2 wanted to advert to his "fluxional method" — the calculus — without actually revealing it. So he used an unusual expedient — after describing his methods of tangents and handling maxima and minima, he added:

The foundations of these operations is evident enough, in fact; but because I cannot proceed with the explanation of it now, I have preferred to conceal it thus: 6accdae13eff7i3l9n4o4qrr4s8t12ux. On this foundation I have also tried to simplify the theories which concern the squaring of curves, and I have arrived at certain general Theorems.

That peculiar string (marked in green) is an inventory of the letters in the phrase that Newton wanted to conceal

Data aequatione quotcunque fluentes quantitates involvente, fluxiones invenire; et vice versa.

 which means

Given an equation involving any number of fluent quantities3 (functions) to find the fluxions4 (derivatives), and vice versa.

So 6a indicates that the Latin phrase contains six instances of the letter a, cc means the letter c appears twice, and so on. In this way Newton could register his discovery without actually revealing it — the fact that he could present an accurate letter inventory of the fundamental theorem of the calculus proved that he had established the theorem before the date his letter was sent.

Assignment

The inventory of a sentence indicates how often each letter of the alphabet appears in it: first the number of times the letter a appears, then the number of times the letter b appears, and so on. The inventory encodes the number of occurrences $$n$$ of a letter $$\alpha$$ in the following way:

When counting occurrences, no distinction is made between uppercase and lowercase letters. The inventory always denotes letters in lowercase. All encodings for successive letters of the alphabet are written one after the other in the inventory. Occurrences of characters that are not letters, are not recorded in the inventory.

Your task:

Example

>>> inventory('Data aequatione quotcunque fluentes quantitates involvente, fluxiones invenire; et vice versa.')
'7accd14eff7i3l9n4o4qrr4s9t7u5vx'
>>> inventory('ut tensio sic vis')
'ce3ino3sttuv'

>>> unpack('6accdae13eff7i3l9n4o4qrr4s8t12ux')
'aaaaaaccdaeeeeeeeeeeeeeeffiiiiiiilllnnnnnnnnnooooqqqqrrssssttttttttuuuuuuuuuuuux'
>>> unpack('ce3ino3sttuv')
'ceiiinosssttuv'

>>> simplify('6accdae13eff7i3l9n4o4qrr4s8t12ux')
'7accd14eff7i3l9n4o4qrr4s8t12ux'
>>> simplify('i2scvotu2ietns')
'ce3ino3sttuv'

Resources

Epilogue

The idea of timestamping information is centuries old. For example, when Robert Hooke8 discovered Hooke's law9 in 1660, he did not want to publish it yet, but wanted to be able to claim priority. So he published the anagram ceiiinosssttuv and later published the translation ut tensio sic vis (Latin for "as is the extension, so is the force"). Similarly, Galileo Galilei10 first published his discovery of the phases of Venus in the anagram form. The technique today is known as trusted timestamping11.

Epilogue

How a book written in 1910 could teach you the basic principle∫ of calculus better than many of the modern textbooks.

calculus
Calculcus Made Easy (Thompson SP, 1910)