A386318 a(n) = the minimum value of (x + 2)*(y + 2) such that x*y = n.
4, 9, 12, 15, 16, 21, 20, 27, 24, 25, 28, 39, 30, 45, 36, 35, 36, 57, 40, 63, 42, 45, 52, 75, 48, 49, 60, 55, 54, 93, 56, 99, 60, 65, 76, 63, 64, 117, 84, 75, 70, 129, 72, 135, 78, 77, 100, 147, 80, 81, 84, 95, 90, 165, 88, 91, 90, 105, 124, 183, 96, 189, 132, 99, 100, 105, 104, 207
Offset: 0
Examples
a(5) = 21 because the 3 X 7 array is the unique array with precisely 5 interior elements. a(12) = 30 because the 5 X 6 array is the smallest with precisely 12 interior elements (the others being 3 X 14 and 4 X 8).
Programs
-
Mathematica
a[n_] := Min[((# + 2)*(n/# + 2))& /@ Select[Divisors[n], #^2 <= n &]]; Array[a, 100] (* Amiram Eldar, Jul 19 2025 *)
-
PARI
a(n) = vecmin(apply(x->((x + 2)*(n/x + 2)), divisors(n))); \\ Michel Marcus, Jul 19 2025
-
Python
from sympy import divisors def A386318(n): if n == 0: return 4 l = len(d:=divisors(n)) return (d[(l-1)>>1]+2)*(d[l>>1]+2) # Chai Wah Wu, Jul 27 2025
Comments