login
A391490
Denominator of k + a/k where n = k^2 + 2a + 1 and -k <= a <= k.
2
1, 1, 2, 1, 1, 3, 2, 3, 1, 1, 4, 3, 2, 3, 4, 1, 1, 5, 4, 5, 2, 5, 4, 5, 1, 1, 6, 5, 3, 5, 2, 5, 3, 5, 6, 1, 1, 7, 6, 7, 3, 7, 2, 7, 3, 7, 6, 7, 1, 1, 8, 7, 4, 7, 8, 7, 2, 7, 8, 7, 4, 7, 8, 1, 1, 9, 8, 9, 4, 3, 8, 9, 2, 9, 8, 3, 4, 9, 8, 9, 1, 1, 10, 9, 5, 9, 10, 3, 5, 9, 2, 9, 5, 3, 10, 9, 5, 9, 10, 1
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).
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)=3.
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)=1.
If n=13 then n = 4^2 + 2 (-2) + 1, so k+a/k = 4 + (-2)/4 = 7/2 and so a(13)=2.
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 -> denom( 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_] := Denominator[f[n]];
PROG
(Python)
from math import gcd
def A391490(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//gcd(b, k) # Chai Wah Wu, Dec 10 2025
CROSSREFS
Paired with A391431.
Sequence in context: A153901 A132844 A006843 * A324797 A049456 A117506
KEYWORD
nonn,frac
AUTHOR
Terence Tao, Dec 10 2025
STATUS
approved