This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A385454 #20 Jul 01 2025 01:06:05 %S A385454 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, %T A385454 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, %U A385454 40,42,36,28,0,45,0,30,48,49,48,50,0,48,44,54,0,56,0 %N A385454 Difference of the largest and smallest semiperimeters of an integral rectangle with area n. %C A385454 For all noncomposite n, a(n) = 0. %C A385454 For each square k^2, a(k^2) = (k^2 + 1) - 2*k = (k-1)^2. %H A385454 James C. McMahon, <a href="/A385454/b385454.txt">Table of n, a(n) for n = 1..10000</a> %F A385454 a(n) = 1 + n - A063655(n). %e A385454 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. %t A385454 a[n_]:=1+n-2Median[Divisors[n]];Array[a,73] %o A385454 (Python) %o A385454 from sympy import divisors %o A385454 def A385454(n): %o A385454 l = len(d:=divisors(n)) %o A385454 return n+1-d[l-1>>1]-d[l>>1] # _Chai Wah Wu_, Jul 01 2025 %Y A385454 Cf. A063655. %K A385454 nonn %O A385454 1,6 %A A385454 _James C. McMahon_, Jun 29 2025