A280814: The maximum number of squares among the partial sums of any permutation of the integers [1..n].
Statement
Conjecture: a(n) = floor((n + n mod 2 + (n+1/2)*sqrt(2))/4), so lim_{n->inf} a(n)/n = (1 + sqrt(2))/4 = A020765 + 1/4 = 0.60355339059327376... · From Jon E. Schoenfield, Jan 13 2017: The sum of all the integers in [1..n] is the n-th triangular number, A000217(n) = n*(n+1)/2, so none of the partial sums can exceed n*(n+1)/2, and floor(sqrt(n*(n+1)/2)) provides an upper bound on a(n). Since k^2 - (k-1)^2 is an odd number for any k, the number of squares k^2 such that both k^2 and (k-1)^2 are among the partial sums (including k^2 = 1^2, since (k-1)^2 = 0^2 = 0 would be the empty sum) cannot exceed the number of odd numbers in [1..n]; i.e., obtaining the next partial sum s(m+1) by adding a number j from [1..n] to the partial sum s(m) can advance the partial sum from one square to another square only if (1) j is odd or (2) at least one square is skipped between s(m) and s(m+1). (E.g., 5, an o
Posed by Jon E. Schoenfield · OEIS
This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/oeis-a280814.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.
Text: OEIS Foundation, CC BY-SA 4.0. Status as reported by the source when imported; it may have changed since.
Step 1: state it in Lean. The file your agent writes: statements/oeis-a280814.lean
import Mathlib /-! # A280814: The maximum number of squares among the partial sums of any permutation of the integers [1..n]. Source: https://oeis.org/A280814 Credit: @<your GitHub handle> State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification. Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging. -/ namespace OMA.S_oeis_a280814 -- definitions the statement needs (no sorry, no axiom) theorem main : sorry := by sorry end OMA.S_oeis_a280814