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.

A262767 Minimum perimeter of a rectangle with area n and integer sides.

Original entry on oeis.org

4, 6, 8, 8, 12, 10, 16, 12, 12, 14, 24, 14, 28, 18, 16, 16, 36, 18, 40, 18, 20, 26, 48, 20, 20, 30, 24, 22, 60, 22, 64, 24, 28, 38, 24, 24, 76, 42, 32, 26, 84, 26, 88, 30, 28, 50, 96, 28, 28, 30, 40, 34, 108, 30, 32, 30, 44, 62, 120, 32
Offset: 1

Views

Author

Tim Cieplowski, Sep 30 2015

Keywords

Comments

a(n) >= A027709(n) = 2*ceiling(2*sqrt(n)). - Dmitry Kamenetsky, Feb 27 2017

Examples

			Since 2 * (2 + 3) < 2 * (1+6), a(6) = 10.
		

Crossrefs

Cf. A063655 (semiperimeter).
Two-dimensional equivalent of A075777.

Programs

  • Mathematica
    f[n_] := Block[{w = Round@ Sqrt@ n}, While[Mod[n, w] != 0, w--]; 2 (w + Round[n/w])]; Array[f, {60}] (* Michael De Vlieger, Oct 01 2015 *)
  • PARI
    a(n) = {local(d); d=divisors(n); 2*(d[(length(d)+1)\2] + d[length(d)\2+1])}
    vector(50, n, a(n)) \\ Altug Alkan, Oct 16 2015
  • Python
    def perimeter(area):
        width = round(area ** (1/2))
        while area % width != 0:
            width -= 1
        return 2*(width + round(area/width))
    

Formula

a(n) = 2*A063655(n). - Michel Marcus, Oct 01 2015