VOOZH about

URL: https://oeis.org/A385454

⇱ A385454 - OEIS


login
A385454
Difference of the largest and smallest semiperimeters of an integral rectangle with area n.
1
0, 0, 0, 1, 0, 2, 0, 3, 4, 4, 0, 6, 0, 6, 8, 9, 0, 10, 0, 12, 12, 10, 0, 15, 16, 12, 16, 18, 0, 20, 0, 21, 20, 16, 24, 25, 0, 18, 24, 28, 0, 30, 0, 30, 32, 22, 0, 35, 36, 36, 32, 36, 0, 40, 40, 42, 36, 28, 0, 45, 0, 30, 48, 49, 48, 50, 0, 48, 44, 54, 0, 56, 0
OFFSET
1,6
COMMENTS
For all noncomposite n, a(n) = 0.
For each square k^2, a(k^2) = (k^2 + 1) - 2*k = (k-1)^2.
LINKS
FORMULA
a(n) = 1 + n - A063655(n).
EXAMPLE
The largest semiperimeter of an integral rectangle with area 9 is 10 (1 x 9 rectangle); the smallest semiperimeter is 6 (3 x 3 rectangle). The difference, a(9) = 4.
MATHEMATICA
a[n_]:=1+n-2Median[Divisors[n]]; Array[a, 73]
PROG
(Python)
from sympy import divisors
def A385454(n):
l = len(d:=divisors(n))
return n+1-d[l-1>>1]-d[l>>1] # Chai Wah Wu, Jul 01 2025
CROSSREFS
Cf. A063655.
Sequence in context: A274441 A213859 A330492 * A350534 A101336 A300001
KEYWORD
nonn
AUTHOR
James C. McMahon, Jun 29 2025
STATUS
approved