Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help


bibkey: wiseman2023a222955 authors: R. H. Hardin; Gus Wiseman year: 2023 title: “OEIS A222955, Number of n X 1 0..1 arrays with every row and column least squares fitting to a zero slope straight line” doi: null url: https://oeis.org/A222955 claim: “Conjecture: A binary word is counted iff it has the same sum of positions of 1’s as its reverse, or, equivalently, the same sum of partial sums as its reverse.” strata_touched:

  • D5/S3/Combinatorics/LeastSquaresBinaryFit license: citation-only triage: anchor

OEIS A222955

The entry counts the binary words of each length whose least squares fit is a line of zero slope. Its terms begin 2, 2, 4, 4, 8, 8, 20, 18, 52, 48, 152, 138, 472, 428, 1520, 1392, ….

Verified locator

  • URL: https://oeis.org/A222955
  • Locator: NAME, “Number of n X 1 0..1 arrays with every row and column least squares fitting to a zero slope straight line, with a single point array taken as having zero slope”; COMMENTS, “Conjecture: A binary word is counted iff it has the same sum of positions of 1’s as its reverse, or, equivalently, the same sum of partial sums as its reverse. - Gus Wiseman, Jan 07 2023”.
  • Sequence author R. H. Hardin, Mar 10 2013; the comment carrying the conjecture is Gus Wiseman, Jan 07 2023. The comment stands and carries no answer.
  • The companion entry https://oeis.org/A359402 lists the numbers whose binary expansion satisfies the position condition and repeats the same bridge in its own COMMENTS: “Conjecture: Also numbers whose binary expansion has as least squares fit a line of zero slope, counted by A222955.”

Reading of the statement

An n X 1 array is a binary word b_1 … b_n written as a column. Its rows are single entries, and the entry’s own convention takes a single point to have zero slope, so the rows impose nothing. The column is the whole word, and the condition on it is that the least squares fit to the points (1, b_1), …, (n, b_n) is a line of zero slope.

The position condition in the comment is that b_1 … b_n and its reverse have the same sum of positions of 1s. Reversal sends position i to n + 1 - i, so with w the number of 1s and S their position sum the reversed sum is (n + 1) * w - S, and the condition reads

2 * S = (n + 1) * w.

Equivalently the average position of a 1 is (n + 1) / 2, the midpoint of the index range.

The single-point convention, which the entry fixes

At n = 1 the best fitting line is not unique: one point is fitted exactly by every line through it. The NAME settles this by fiat, taking a single point array to have zero slope. The convention agrees with the position condition, which at n = 1 reads 2 * b_1 = 2 * b_1 and so holds for both words of length one; the data has a(1) = 2. The convention also matches the reading of optimality used below, under which a zero slope line is one that attains the least squared error rather than the unique line attaining it.

Scope of the recorded answer

The comment holds, for arbitrary rational samples and not only for binary words.

Write w and S for the sum of the values and the position-weighted sum, bb = w / n for the mean value, ib = (n + 1) / 2 for the mean position, d_i = b_i - bb, u_i = i - ib, and

U = Σ u_i ^ 2,        C = Σ d_i * u_i.

For any α and β, put γ = bb - α - β * ib. Then b_i - α - β * i = d_i - β * u_i + γ, and because Σ d_i = 0 and Σ u_i = 0 the cross terms in the expanded square collapse:

Σ (b_i - α - β * i) ^ 2  -  Σ d_i ^ 2  =  β ^ 2 * U  +  n * γ ^ 2  -  2 * β * C.

If C = 0 the right side is a sum of two squares with nonnegative coefficients, so the zero slope line α = bb, β = 0 attains the least squared error. If C ≠ 0 then n ≥ 2, hence U > 0, and the choice β = C / U with γ = 0 makes the right side - C ^ 2 / U, which is negative, so no zero slope line is optimal. At n = 1 the vanishing of u_1 forces C = 0, which is the analytic content of the entry’s single point convention.

Finally C = Σ (b_i - bb) * (i - ib) = S - ib * w, so C = 0 is exactly 2 * S = (n + 1) * w.

Independent check of the counting claim

Counting the binary words of length n that satisfy 2 * S = (n + 1) * w gives

2, 2, 4, 4, 8, 8, 20, 18, 52, 48, 152, 138, 472, 428, 1520, 1392

for n = 1 … 16, which reproduces the entry’s first sixteen terms.

Bounded prior-resolution evidence

Both entries were read in full and record no proof and no reference to one; the conjecture has stood on A222955 since January 2023 and is repeated on A359402. A web query over the two A-numbers together with the least squares phrasing returned no paper or note giving the equivalence. Citation indices were not exhaustively reachable, so this is a bounded negative finding and no worldwide priority claim is made.