Skip to content
Subscribe
All writing
MathLeanAI agentsFormal proof

The Closest Race of the Night: 665 Characters Against 768 (OEIS A025248)

Most of our proofs were seven times shorter than the one they replaced. This one had to beat a proof that someone had already squeezed down to 768 characters.

Most of the proofs my AI agent submitted that night replaced something five to ten times longer. Those were not close. This one was.

By the time we reached A025248, someone had already cut its proof from 4,983 characters down to 768. To take the record we had to beat a proof that was already lean.

Proof length: 4,983 characters for the first accepted proof, 768 for the shortest before mine, 665 for mine

The bar

The site replaces an accepted proof only when the new one is at least 5 percent shorter and at least 20 characters shorter. That rule stops people from winning by deleting a space.

Against 768, five percent means 729 or fewer. Ours came in at 665. That is 13 percent under, a margin of 103 characters.

For comparison, on another problem that night I lost by 24.

The sequence

Start with 1, 0, 2. Build each later number by pairing up earlier ones, multiplying, and adding, stopping when the right-hand partner would fall before the third entry.

4th = 1×2 = 2
5th = 1×2 + 0×2 = 2
6th = 1×2 + 0×2 + 2×2 = 6
1, 0, 2, 2, 2, 6, 14, 26, 58, 142, 326, 754, 1826, 4438

The first numbers of OEIS sequence A025248

The zero in second place matters. Every product that involves the second entry vanishes, and that makes everything downstream simpler.

A shorter rule than its siblings

The guessed shortcut for this sequence uses three earlier numbers. Most of its siblings need four.

n·a(n) − (2n−3)·a(n−1) + (n−3)·a(n−2) − 4(2n−9)·a(n−3) = 0

With n = 7:

7×14 - 11×6 + 4×2 - 20×2 = 0
98 - 66 + 8 - 40 = 0

You can see why in the one-line equation for the whole list:

A^2 = (1 + x)·A - (x + 2x^3)

Compare it with the same equation for the sequence starting 1, 1, 2. There the first bracket has three terms. Here the zero has wiped one out. A smaller equation gives a shorter rule, and a shorter rule gives a shorter proof for everybody. That is probably part of why this record was already so tight.

Where the 103 characters came from

Both proofs are public, so I compared them. They take the same route. Both pack the list into one object, write the equation above, take its rate of change, and combine the two so A^2 cancels. The central line is nearly identical in each.

The difference is in the bookkeeping at the start: convincing Lean that the pairing rule really does produce that one-line equation. The earlier proof spends about eight lines on it. Ours spends two.

So no idea separates the two proofs. About a hundred characters of tidier setup does. On a 5,000-character proof nobody would notice that. Against 768 it was enough.

The method itself is described in the first problem of the night.

The numbers

Accepted as pull request 63540. It is the shortest proof on the problem page as of November 29, 2026. Someone else proved this first, and a second person shortened it before we did. Ours is the third version on file.

A record this tight is also the one most likely to fall next. If you check the page and someone has taken it, that is the board working.

Get the next build note.

What I'm building, what worked, and what broke, whenever there's something worth sharing.

Subscribe to my newsletter

Keep up with the work.

My notes on useful AI, the systems I build, and what I learn running a business.