OFFSET
2,2
COMMENTS
The least side length that is required to express n as the sum of two rectangular numbers.
The minimum height of an area-n generalized "L" polyomino (a union of two integer-side rectangles in portrait orientation).
The largest n such that a(n) = k is 2k^2 since that n can be written as k*k + k*k.
LINKS
Glen Whitney, Table of n, a(n) for n = 2..10000
EXAMPLE
For n = 7, we may write
7 = 1*1 + 2*3,
7 = 1*2 + 1*5,
7 = 1*3 + 2*2.
Of these, the first and third have the smallest value for the largest factor appearing. Therefore, a(7) = 3.
MAPLE
b:= proc(n) b(n):= min(select(x-> x^2>=n, numtheory[divisors](n))) end:
a:= proc(n) a(n):= min(seq(max(b(i), b(n-i)), i=1..n/2)) end:
seq(a(n), n=2..100); # Alois P. Heinz, Oct 15 2024
MATHEMATICA
b[n_] := SelectFirst[Divisors[n], #^2 >= n&];
a[n_] := Min[Table[Max[b[i], b[n-i]], {i, 1, n/2}]];
Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Jan 26 2025, after Alois P. Heinz *)
PROG
(Python)
from sympy import divisors
from functools import cache
@cache
def b(n): return next(x for x in divisors(n) if x**2 >= n)
def a(n): return min(max(b(i), b(n-i)) for i in range(1, n//2+1))
print([a(n) for n in range(2, 100)]) # Michael S. Branicky, Oct 15 2024 after Alois P. Heinz
CROSSREFS
KEYWORD
nonn
AUTHOR
Glen Whitney, Oct 14 2024
STATUS
approved