On Saturday, November 28, I pointed an AI agent at a public list of math problems and asked it to find one it could finish. By that night it had a proof accepted. A computer checked every step, so nobody has to take my word for it, or the agent's.
I am not a mathematician. This is a note about what the problem was, how the proof works in plain terms, and the two hours that almost cost me the result.
Where this happened
The site is called Left to Solve. It is a public registry of math problems written in Lean, a programming language built for proofs. You do not submit an argument for a person to read. You submit code, and a checker either accepts it or rejects it. There is no partial credit and no benefit of the doubt.
That is the reason someone like me can take part at all. I cannot judge a proof about generating functions. The checker can, and it does not care who wrote it.
The problem: counting paths
Picture a walk across graph paper. Each step goes up, down, or flat. The walk never dips below the ground and it finishes back on the ground. Flat steps come in 4 colors, and they are only allowed at even heights: ground level, height 2, height 4 and so on.

How many different walks are there with 0 steps, 1 step, 2 steps, 3 steps? The answers start like this:
1, 4, 17, 72, 306, 1304, 5573, 23888, 102702, 442904, 1915978, 8314480, 36195236, 158067312
That list is entry A257388 in the OEIS, the online encyclopedia of number sequences. You can check the first few by hand. With zero steps there is exactly one walk, the empty one, so the list starts with 1. With one step, the only option is a flat step in one of 4 colors, so 4. With two steps, it is 16 colored pairs plus one up-then-down, so 17.
The guess
In 2016 R. J. Mathar posted a conjecture on that page. It says you never have to count paths at all. Any number in the list can be computed from the three before it:
(n+2)·a(n) − 8(n+1)·a(n−1) + 4(3n+1)·a(n−2) + 8(2n−3)·a(n−3) = 0
Try it with n = 5:
7×1304 - 48×306 + 64×72 + 56×17 = 0
9,128 - 14,688 + 4,608 + 952 = 0
It works for every number in the published list. Working for the first thousand cases would still be a guess. The job was to show it can never fail.

How the proof goes
The agent did the math on paper first and only then wrote Lean. The argument has four moves.
- Put the whole list into one object. Mathematicians call it a generating function. Think of one endless shelf holding every number in the list, in order.
- Turn the counting rule into one equation about the shelf. Longer paths are built by gluing shorter ones together. That fact becomes one short equation in which the shelf gets multiplied by itself.
- Take the rate of change of that equation. Combining the equation with its own rate of change cancels the self-multiplication. What is left is a simpler equation with no squares in it.
- Read the simpler equation one slot at a time. At slot n it says exactly Mathar's rule.
The final Lean file is 1,247 characters. The whole proof fits on one screen.
What went wrong
Lean is picky in ways a person is not. The agent's notes from that hour are a list of small traps. A function call needs a space where a human would not put one. A simplifier turned 8 times F into a form the next step could not read. Constants had to be written as multiples of X so the checker could look up their coefficients. None of that is math. It is closer to getting a form through a strict clerk. Once the paper proof existed, this part took about half an hour of back and forth with the checker.
The two hours. The first proof the agent finished was 2,165 characters. The accepted proof on the site at that moment was 6,283. The site replaces a proof when a new one is at least 5 percent and 20 characters shorter, so ours qualified easily.
The agent asked me before publishing anything under my name. That is the right default, and I said yes. Then the submission got interrupted on my side and sat for about two hours.
In those two hours someone else merged a proof of 1,546 characters. Our 2,165 was now the long one. The agent told me that plainly and did not submit it.
So it went back and cut the proof down to 1,247 characters, 19 percent under the new record, and that one was accepted.

What I changed afterward: I gave the agent a standing yes to submit the moment a proof passes the checker locally. Asking first was correct. Making it wait on me every time was the expensive part.
What this is and is not
Someone else proved this first. The site records first solves and shortest proofs separately, and what I have is the second kind: the shortest accepted proof of this problem as of November 29, 2026. It may get beaten. That is how the board works.
I also went looking for a first solve and did not get one. Every problem easy enough to finish in an evening already had proofs waiting in a queue of more than ten thousand submissions. Four problems the agent judged provable were all solved by other people within the hour.
The useful part came after. The method that cracked this problem turned out to work on a whole family of similar ones. The agent wrote the method down, handed it to five helper agents running at the same time, and by the end of the night there were 27 submissions. 26 were accepted.
Here is every write-up from that night.
- 78557 Never Makes a Prime, and I Lost the Race by 24 Characters
- The Matrix Puzzle Where Every Answer Is Possible
- Six Numbers and No More: A Digit-Sum Puzzle (OEIS A152491)
- Why the Remainders Have to Repeat (OEIS A340880)
- A 599-Character Proof About Paths With a Dead End (OEIS A143013)
- Every Number Built From All the Ones Before It (OEIS A225887)
- A Sequence That Multiplies by About Ten Thirds (OEIS A126931)
- A Sequence That Wanders Below Zero, and the Rule That Still Holds (OEIS A174169)
- Paths With No Peaks, in Two Colors (OEIS A187256)
- A Remix of the Catalan Numbers (OEIS A157002)
- A Rule That Looks Back Five Steps (OEIS A346074)
- Start With 1, 1, 2 and Let the Numbers Multiply (OEIS A025244)
- The Closest Race of the Night: 665 Characters Against 768 (OEIS A025248)
- When the Guessed Rule Has Cubes in It (OEIS A025251)
- Three Starting Numbers, One Shortcut (OEIS A025255)
- Same Recipe, Different Start: 1, 1, 3 (OEIS A025256)
- A Sequence With Zeros in It (OEIS A025258)
- One Negative Number at the Start (OEIS A025259)
- The Sequence That Stalls Before It Grows (OEIS A025260)
- The Longest Proof in the Family: 784 Characters (OEIS A025261)
- Start With Four Ones (OEIS A025268)
- The Fastest Grower in the Family (OEIS A025269)
- A Proof the Reference Page Had Already Sketched (OEIS A025270)
- Change One Starting Number, Get a New Sequence (OEIS A025272)
- Count From 0 or From 1? One Rule, Written Two Ways (OEIS A025273)
- A Slow Starter: 1, 0, 1, 0, 0, 1 (OEIS A025275)
The problem page is here and the accepted submission is pull request 54625.
Get the next build note.
What I'm building, what worked, and what broke, whenever there's something worth sharing.