login
A391431
Numerator of k + a/k where n = k^2 + 2*a + 1 and -k <= a <= k.
2
1, 1, 3, 2, 2, 7, 5, 8, 3, 3, 13, 10, 7, 11, 15, 4, 4, 21, 17, 22, 9, 23, 19, 24, 5, 5, 31, 26, 16, 27, 11, 28, 17, 29, 35, 6, 6, 43, 37, 44, 19, 45, 13, 46, 20, 47, 41, 48, 7, 7, 57, 50, 29, 51, 59, 52, 15, 53, 61, 54, 31, 55, 63, 8, 8, 73, 65, 74, 33, 25, 67
OFFSET
1,3
COMMENTS
One can make one of the conditions -k <= a or a <= k strict inequality if desired to avoid collisions (but the definitions at these endpoints are compatible). The quantity k + a/k is the largest sum of sidelengths of n squares packed into a unit square with all sides parallel to the coordinate axes (Erdős problem 106). The reciprocal 1 / (k+a/k) is also the infimal value of max sum x_{i_r} where x_1,...,x_n are positive distinct reals summing to 1 and the maximum is over monotone subsequences (Erdős problem 1026).
Fixed points are listed in A132411. - Ivan N. Ianakiev, Dec 09 2025
REFERENCES
C. Campbell and W. Staton, A square-packing problem of Erdős, Am.Math.Mon., 112.2(2005), pp.165-167.
P. Erdős and A. Soifer, Squares in a square, Geombinatorics 4.4(1995), pp. 110-114.
I. Praton, Packing squares in a square, Math.Mag. 81.5 (2008), pp. 358-361.
LINKS
Jineon Baek, Junnosuke Koizumi, and Takahiro Ueoro, A note on the Erdős conjecture about square packing, arXiv:2411.07274 [math.CO], 2024.
Thomas Bloom, Problem 106, Erdős Problems.
Thomas Bloom, Problem 1026, Erdős Problems.
EXAMPLE
If n=8 then n = 3^2 + 2*(-1) + 1, so k+a/k = 3 + (-1)/3 = 8/3 and so a(8)=8.
If n=9 then one can write n = 2^2 + 2*(2) + 1 or n = 4^2 + 2*(-4) + 1, but in either case k+a/k is equal to 2 + 2/2 = 4 + (-4)/4 = 3/1 and so a(9)=3.
If n=13 then n = 4^2 + 2*(-2) + 1, so k+a/k = 4 + (-2)/4 = 7/2 and so a(13)=7.
MAPLE
f := proc(n) local k, a;
for k from 1 while (k-1)^2 <= n do
a := (n - k^2 - 1)/2;
if type(a, integer) and -k <= a and a <= k then
return k + a/k;
fi;
od;
end:
a := n -> numer( f(n) ):
seq(a(n), n=1..80);
MATHEMATICA
f[n_Integer?Positive] := Module[{k, a},
For[k = 1, (k - 1)^2 <= n, k++,
a = (n - k^2 - 1)/2;
If[IntegerQ[a] && -k <= a <= k,
Return[k + a/k];
];
];
];
a[n_] := Numerator[f[n]];
PROG
(Python)
from math import gcd
def A391431(n):
for k in range(1, n+2):
a = n-k**2-1
if a&1^1 and abs(b:=a>>1)<=k:
return (k*k+b)//gcd(b, k) # Chai Wah Wu, Dec 10 2025
CROSSREFS
Sequence in context: A091264 A021760 A092419 * A293268 A020835 A244639
KEYWORD
nonn,frac
AUTHOR
Terence Tao, Dec 09 2025
STATUS
approved