Abstract
Integer sequences are fundamental to combinatorial mathematics, yet their discovery has historically relied on manual submission and human intuition. This paper presents an automated framework for discovering mathematically significant integer sequences by generating formulas in first-order logic and computing their combinatorial spectra. By leveraging the $C^2$ logic fragment and advanced pruning techniques to overcome the "redundancy wall," the system generated over 26,000 unique sequences. Validation against the Online Encyclopedia of Integer Sequences (OEIS) yielded 301 matches, providing new combinatorial interpretations for existing sequences and identifying numerous potentially novel ones.
Introduction
In combinatorics, integer sequences often serve as the primary language for describing the properties of mathematical objects. Whether counting the number of ways to arrange items or the number of possible graphs with specific constraints, these sequences—many of which are cataloged in the Online Encyclopedia of Integer Sequences (OEIS)—are essential for mathematical research.
However, the OEIS is limited by its reliance on manual contributions. This creates a "discovery gap" where natural, mathematically interesting sequences remain uncataloged simply because they have not yet been manually derived. Furthermore, many known sequences lack a formal "combinatorial interpretation"—a clear logical description of what the numbers represent. This research addresses these gaps by automating the generation of sequences through a logical lens, ensuring that every discovered sequence is accompanied by a rigorous definition.
Methodology: Logic as a Generative Tool
The researchers developed a two-step pipeline designed to explore the space of mathematical properties and translate them into numerical sequences.
1. Sentence Generation in $C^2$
The system utilizes First-Order Logic (FOL) to define properties of mathematical structures. Specifically, it focuses on the two-variable fragment ($FO^2$) and its extension with counting quantifiers ($C^2$). These fragments are chosen for their unique balance: they are expressive enough to describe diverse objects like permutations and directed graphs, yet restricted enough to allow for efficient model counting. The system performs a breadth-first search to generate logical sentences, building complexity literal by literal.
2. Lifted Model Counting
For every generated sentence, the system calculates its "combinatorial spectrum"—the sequence of counts representing the number of models for domain sizes $n = 1, 2, 3, \dots$. To do this efficiently, the authors employ Weighted First-Order Model Counting (WFOMC) algorithms. Unlike brute-force methods that would struggle as $n$ increases, WFOMC can compute these counts in polynomial time relative to the domain size, making it feasible to generate the first several terms of thousands of sequences.
Overcoming the Redundancy Wall
The primary technical obstacle in automated discovery is the "Redundancy Wall." A naive search through logic space produces millions of syntactically distinct formulas that are semantically identical (e.g., $A \land B$ vs. $B \land A$). Without intervention, the system would waste nearly all its resources re-calculating the same sequences.
To solve this, the authors introduced a suite of pruning techniques. The most significant is Cell Graph Isomorphism, a method that detects when different formulas will inevitably yield the same count based on their underlying structure. By handling negations, permuting arguments, and identifying subsumption, the researchers reduced the search space by several orders of magnitude, allowing the system to explore formulas with up to 12 literals.
Results and Validation
The system's effectiveness was measured by its ability to "re-discover" sequences already deemed interesting by the mathematical community.
- OEIS Integration: From a database of over 26,000 unique generated sequences, 301 (approximately 1.2%) were found to already exist in the OEIS. While the percentage is small, the absolute number of matches validates that the system is successfully navigating toward "human-interesting" mathematics.
- New Interpretations: For several sequences in the OEIS that previously lacked a clear combinatorial characterization, the system provided a logical formula that explains exactly what the sequence counts.
- Novel Discoveries: Beyond the OEIS matches, the system identified thousands of sequences describing "natural" objects not yet cataloged. Examples include specific subclasses of directed graphs where every vertex has a non-zero out-degree and specific connectivity constraints.
Discussion and Future Work
While the current framework is a significant step toward automated mathematical discovery, it faces limitations in expressivity. The $C^2$ fragment cannot describe global properties like "connectedness" or "planarity," which require more complex logic. Additionally, the system currently lacks a mathematical proxy for "interestingness"; it treats all unique sequences as equal until they are checked against the OEIS.
Future research will focus on using machine learning to guide the search toward more promising regions of the logic space and expanding the system's expressivity to capture more complex combinatorial structures. By bridging the gap between formal logic and integer sequences, this work provides a new foundation for the systematic exploration of the combinatorial universe.
Summary updated