cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A386318 a(n) = the minimum value of (x + 2)*(y + 2) such that x*y = n.

Original entry on oeis.org

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

Views

Author

Ben Orlin, Jul 18 2025

Keywords

Comments

Smallest number of elements in a rectangular array with precisely n interior elements.
If baking square brownies in a rectangular pan, a(n) is the minimum number of brownies required to have precisely n gooey center brownies.
A063655(n) gives the smallest semiperimeter b+d of an integral rectangle with area n = b*d. Here, a(n) = (b+2)(d+2) = n + 2*(A063655(n)) + 4.
a(n) >= A386316(n) since A386316 relaxes the conditions to x*y >= n rather than equality.

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).
		

Crossrefs

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

Formula

a(p) = 3*(p+2) for p prime.
a(n) = (x + 2)*(y + 2) for n = x*y semiprime (a term of A001358).
a(k^2) = (k+2)^2 = A386316(k^2).
a(n) = n + 2*(A063655(n)) + 4.
Showing 1-1 of 1 results.