Skip to content

feat(ErdosProblems/342)#3438

Merged
mo271 merged 11 commits intogoogle-deepmind:mainfrom
aditya-ramabadran:fix/issue-2120
Mar 17, 2026
Merged

feat(ErdosProblems/342)#3438
mo271 merged 11 commits intogoogle-deepmind:mainfrom
aditya-ramabadran:fix/issue-2120

Conversation

@aditya-ramabadran
Copy link
Copy Markdown
Contributor

@aditya-ramabadran aditya-ramabadran commented Mar 6, 2026

Description

With $a_1=1 $ and $a_2=2$ let $a_{n+1} $ for $n\ge 2 $ be the least integer greater than $a_n $ which can be expressed uniquely as $a_i + a_j $for $i < j <= n$. Do infinitely many pairs $(a,a+2)$ occur in the sequence? Does Ulam's sequence eventually have periodic differences? Is the density of the sequence 0?

Testing

  • Compiles successfully
$ lake build FormalConjectures/ErdosProblems/342.lean
Build completed successfully.

> With a1=1  and a2=2  let a_{n+1}  for n >= 2  be the least integer greater than a_n  which can be expressed uniquely as a_i + a_j for i < j <= n.  Do infinitely many pairs (a,a+2)  occur in the sequence?

- First part of Erdos 342, google-deepmind#2120

* Testing
- Compiles successfully
```shell
$ lake build FormalConjectures/ErdosProblems/342.lean
Build completed successfully.
```
@github-actions github-actions bot added the erdos-problems Erdős Problems label Mar 6, 2026
@aditya-ramabadran aditya-ramabadran changed the title Erdos Problem 342, first part feat(ErdosProblems): Erdos Problem 342, first part Mar 6, 2026
@aditya-ramabadran aditya-ramabadran changed the title feat(ErdosProblems): Erdos Problem 342, first part ErdosProblems/342, first part Mar 6, 2026
Copy link
Copy Markdown
Collaborator

@mo271 mo271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Looks good mathematically, just a few suggestions for improvement

Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
aditya-ramabadran and others added 2 commits March 8, 2026 08:51
Co-authored-by: Moritz Firsching <firsching@google.com>
@aditya-ramabadran
Copy link
Copy Markdown
Contributor Author

I made the changes @mo271 and added TODOs for the other parts. Part (iii) is also equivalently in Ben Green's problems as Problem 7. There are also some more open ended parts (Ben Green asks "Can one
explain the curious Fourier properties of this sequence?") that can't really be formalized

@aditya-ramabadran
Copy link
Copy Markdown
Contributor Author

Actually I was able to formalize the second part as well by looking at how periodic differences were formalized in https://github.com/google-deepmind/formal-conjectures/blob/main/FormalConjectures/ErdosProblems/341.lean

@aditya-ramabadran aditya-ramabadran changed the title ErdosProblems/342, first part ErdosProblems/342 Mar 9, 2026
@aditya-ramabadran
Copy link
Copy Markdown
Contributor Author

Formalized the third part as well, also removed the comment about Ben Green's open problem 7 from part (iii) since it's not exactly equivalent (Ben Green Problem 7 asks if the sequence has positive asymptotic density, this is only the negation of having 0 asymptotic density if we assume the asymptotic density / limit exists)

@aditya-ramabadran aditya-ramabadran requested a review from mo271 March 9, 2026 17:21
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
@aditya-ramabadran
Copy link
Copy Markdown
Contributor Author

Thanks @eric-wieser!

@aditya-ramabadran aditya-ramabadran changed the title ErdosProblems/342 feat(ErdosProblems/342) Mar 12, 2026
Copy link
Copy Markdown
Collaborator

@mo271 mo271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some comments.

A good follow up might be to do problem 7 from Greens open problem list?!

Comment thread FormalConjectures/ErdosProblems/342.lean
Comment thread FormalConjectures/ErdosProblems/342.lean
@mo271 mo271 added the awaiting-author The author should answer a question or perform changes. Reply when done. label Mar 15, 2026
Co-authored-by: Moritz Firsching <firsching@google.com>
@aditya-ramabadran
Copy link
Copy Markdown
Contributor Author

aditya-ramabadran commented Mar 16, 2026

Thanks @mo271, not sure what's better between having the test for a3, having the test but sorrying it out, or not having it at all so for now just committed your changes with the test :)

And yes, can easily do Ben Green problem 7 next!

Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Comment thread FormalConjectures/ErdosProblems/342.lean Outdated
Co-authored-by: Moritz Firsching <firsching@google.com>
@aditya-ramabadran
Copy link
Copy Markdown
Contributor Author

Thanks! These changes are definitely cleaner

Copy link
Copy Markdown
Collaborator

@mo271 mo271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mo271 mo271 enabled auto-merge (squash) March 17, 2026 16:39
@mo271 mo271 merged commit ed2bf7d into google-deepmind:main Mar 17, 2026
6 checks passed
mo271 pushed a commit that referenced this pull request Apr 4, 2026
# Description
> Does Ulam's sequence have positive density? Can one explain the
curious Fourier properties of Ulam's sequence?

I've formalized the first part, basically borrowing what I did in #3438.
I discuss the second part more in the issue #1546.

# Testing
Compiles successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author The author should answer a question or perform changes. Reply when done. erdos-problems Erdős Problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erdős Problem 342: Ulam's Sequence: Properties and Asymptotic Behavior

3 participants