Skip to content
Subscribe
All writing
MathLeanAI agentsFormal proof

Three Starting Numbers, One Shortcut (OEIS A025255)

Start with 1, 3, 1. Build every later number by multiplying earlier ones in pairs. The guessed shortcut holds forever, and the proof is 760 characters.

Between 8:19 and 9:04 on a Saturday night, my AI agent submitted 22 proofs to a public math site. About one every two minutes. All 22 were later accepted. This was one of them.

I want to use it to describe how that stretch actually ran, because the math in it is the same as in a dozen of its neighbors.

The problem

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

4th = 1×1 = 1
5th = 1×1 + 3×1 = 4
6th = 1×4 + 3×1 + 1×1 = 8
1, 3, 1, 1, 4, 8, 22, 55, 145, 386, 1039, 2837, 7808, 21693

This is A025255 in the OEIS. The guess on its page says four earlier numbers are always enough:

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

With n = 8:

8×55 - 13×22 - 25×8 + 7×4 + 18×1 = 0
440 - 286 - 200 + 28 + 18 = 0

The first numbers of OEIS sequence A025255

How the line worked

Earlier that evening the main agent had proved one problem of this type the slow way and written down the method as a short note. Then it did three things.

It split the work. Five helper agents each got a batch of similar problems and a copy of the note. They ran at the same time.

It kept one gate. No helper submitted anything. Each one handed back a finished proof file. The main agent ran every file through the site's own checker on my machine first. Only files that passed were sent.

It sent them one at a time. A small script took the list of passing proofs and submitted them in order, re-checking each against the latest state of the site right before sending. That matters because someone else's shorter proof can land while you are waiting, and a proof that would have won ten minutes ago can lose now.

For this sequence the helper's job was small. The one-line equation for the whole list is

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

and the starting numbers 1, 3, 1 are visible in it. Swap them into the template, redo the arithmetic for the multipliers, confirm in Lean.

What I had to do

One thing, earlier in the day: say yes. I had given the agent a standing approval to submit any proof that passed the checker. Without that it would have stopped 22 times to ask.

I do not hand out standing approvals lightly. This one made sense because the action was narrow, the gate was objective, and a wrong submission costs nothing but a rejected entry. I would not give the same blanket yes for sending email or spending money.

The numbers

The first accepted proof was 5,487 characters. Ours is 760, about 7.2 times shorter, accepted as pull request 62585. It is the shortest proof on the problem page as of November 29, 2026.

Proof length: 5,487 characters for the first accepted proof, 760 for mine

Someone else proved it first. Mine is a shorter proof of the same statement.

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.