OFFSET
1,1
COMMENTS
a(n) >= A027709(n) = 2*ceiling(2*sqrt(n)). - Dmitry Kamenetsky, Feb 27 2017
FORMULA
a(n) = 2*A063655(n). - Michel Marcus, Oct 01 2015
EXAMPLE
Since 2 * (2 + 3) < 2 * (1+6), a(6) = 10.
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 *)
PROG
(Python)
def perimeter(area):
width = round(area ** (1/2))
while area % width != 0:
width -= 1
return 2*(width + round(area/width))
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tim Cieplowski, Sep 30 2015
STATUS
approved