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.

User: Ben Orlin

Ben Orlin's wiki page.

Ben Orlin has authored 3 sequences.

A386316 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, 20, 20, 24, 24, 25, 28, 30, 30, 35, 35, 35, 36, 40, 40, 42, 42, 45, 48, 48, 48, 49, 54, 54, 54, 56, 56, 60, 60, 63, 63, 63, 64, 70, 70, 70, 70, 72, 72, 77, 77, 77, 80, 80, 80, 81, 84, 88, 88, 88, 88, 90, 90, 96, 96, 96, 96, 99, 99, 99, 100, 104, 104, 108
Offset: 0

Author

Ben Orlin, Jul 18 2025

Keywords

Comments

Smallest number of elements in a rectangular array with at least n interior elements.
If baking square brownies in a rectangular pan, a(n) is the minimum number of brownies required to have at least n gooey center brownies.
a(n) = the minimum of A386318(m) for m >= n. If n < k^2, then the value of m that achieves this minimum is also strictly less than k^2.
Conjecture: As n grows, the length of the longest run grows without bound. The first run of length 50 begins at a(506269) = 509120. Up to 10^6 terms, the longest runs are of length 59.

Examples

			a(5) = a(6) = 20 because the 4 X 5 array is the smallest with at least 5 interior elements, and the smallest with at least 6 interior elements.
		

Crossrefs

Cf. A386318.

Programs

  • Mathematica
    Table[Minimize[{(x+2)(y+2), x y >= n && x>=0 && y>=0}, {x,y}, Integers][[1]], {n, 0, 67}] (* Giovanni Resta, Jul 21 2025 *)
  • PARI
    a(n) = my(m=oo, mm); for (x=0, n, for (y=0, n, if ((x*y >= n) && (mm=(x + 2)*(y + 2)) <= m, m = mm););); m; \\ Michel Marcus, Jul 21 2025
  • Python
    import math
    def a(n):
        if n == 0: return 4
        min_val = 3*(n+2)
        for x in range(1, math.isqrt(n)+1):
            y = (n + x - 1) // x
            if (x + 2) * (y + 2) < min_val:
                    min_val = (x + 2) * (y + 2)
        return min_val
    

Formula

a(k^2) = (k+2)^2 = A386318(k^2).
a(k^2 - 1) = (k+1)(k+3) = A386318(k^2 - 1).

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

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.

A352419 Triangle read by rows T(n,k): number of three-in-a-rows in n-dimensional tic-tac-toe through a cell that is central in k dimensions (for k=0..n).

Original entry on oeis.org

0, 1, 1, 3, 2, 4, 7, 4, 5, 13, 15, 8, 7, 14, 40, 31, 16, 11, 16, 41, 121, 63, 32, 19, 20, 43, 122, 364, 127, 64, 35, 28, 47, 124, 365, 1093, 255, 128, 67, 44, 55, 128, 367, 1094, 3280, 511, 256, 131, 76, 71, 136, 371, 1096, 3281, 9841, 1023, 512, 259, 140, 103, 152, 379, 1100, 3283, 9842, 29524
Offset: 0

Author

Ben Orlin, Mar 15 2022

Keywords

Comments

A tic-tac-toe board in n dimensions consists of 3^n cells. Each cell is central (between others) in k dimensions and extremal (not between others) in n-k dimensions. In standard n=2 tic-tac-toe, k=0 gives a corner, k=2 gives the center, and k=1 gives an edge.
A000225 gives the first term in each row: a(n) is the number of three-in-a-rows passing through corner cells in n-dimensional tic-tac-toe = 2^n - 1.
A003462 gives the final term in each row: a(n) is the number of three-in-a-rows passing through the center cell in n-dimensional tic-tac-toe = (3^n - 1)/2.
A007051 gives the penultimate term in each row: a(n) is the number of three-in-a-rows passing through a cell in n-dimensional tic-tac-toe that is central in n - 1 dimensions and extremal in 1 dimension = (3^(n-1))/2 + 1.
A170804 gives the minimum of each row: a(n) is the smallest number of three-in-a-rows passing through any cell in n-dimensional tic-tac-toe.
A094374 -1 gives the central values of even rows: a(n) - 1 is the number of three-in-a-rows passing through a cell in 2n-dimensional tic-tac-toe that is central in n dimensions and extremal in n dimensions = (2^n - 1) + (3^n - 1)/2.

Examples

			Table begins:
   0;
   1,  1;
   3,  2,  4;
   7,  4,  5, 13;
  15,  8,  7, 14, 40;
  31, 16, 11, 16, 41, 121;
  63, 32, 19, 20, 43, 122, 364;
		

Crossrefs

Formula

T(n,k) = (3^k - 1)/2 + 2^(n-k) - 1.