A385454
Difference of the largest and smallest semiperimeters of an integral rectangle with area n.
0
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
James C. McMahon, Table of n, a(n) for n = 1..10000
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]
CROSSREFS
KEYWORD
nonn,new
AUTHOR
James C. McMahon, Jun 29 2025
STATUS
approved