

A227538


Smallest k such that a partition of n into distinct parts with perimeter k exists.


3



0, 1, 2, 3, 4, 5, 4, 7, 8, 6, 5, 9, 8, 9, 7, 6, 11, 12, 9, 10, 8, 7, 11, 12, 13, 10, 11, 9, 8, 15, 12, 13, 14, 11, 12, 10, 9, 16, 17, 13, 14, 15, 12, 13, 11, 10, 16, 17, 18, 14, 15, 16, 13, 14, 12, 11, 16, 17, 18, 19, 15, 16, 17, 14, 15, 13, 12, 22, 17, 18, 19
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

The perimeter is the sum of all parts having less than two neighbors.
a(n) is also the smallest perimeter among all sets of positive integers whose volume (sum) is n.  Patrick Devlin, Jul 23 2013


LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..5000


FORMULA

a(n) = min { k : A227344(n,k) > 0 }.
a(A000217(n)) = n+1 for n>1.


EXAMPLE

a(0) = 0: the empty partition [] has perimeter 0.
a(1) = 1: [1] has perimeter 1.
a(3) = 3: [1,2], [3] have perimeter 3.
a(6) = 4: [1,2,3] has perimeter 4.
a(7) = 7: [1,2,4], [3,4], [2,5], [1,6], [7] have perimeter 7; no partition of 7 into distinct parts has a smaller perimeter.
a(10) = 5: [1,2,3,4] has perimeter 5.
a(15) = 6: [1,2,3,4,5] has perimeter 6.
a(29) = 15: [1,2,3,4,5,6,8] has perimeter 1+6+8 = 15.
a(30) = 12: [4,5,6,7,8] has perimeter 12.


MAPLE

b:= proc(n, i, t) option remember; `if`(n=0, `if`(t>1, i+1, 0),
`if`(i<1, infinity, min(`if`(t>1, i+1, 0)+b(n, i1, iquo(t, 2)),
`if`(i>n, NULL, `if`(t=2, i+1, 0)+b(ni, i1, iquo(t, 2)+2)))))
end:
a:= n> b(n$2, 0):
seq(a(n), n=0..100);


MATHEMATICA

b[n_, i_, t_] := b[n, i, t] = If[n==0, If[t>1, i+1, 0], If[i<1, Infinity, Min[If[t>1, i+1, 0] + b[n, i1, Quotient[t, 2]], If[i>n, Infinity, If[t == 2, i+1, 0] + b[ni, i1, Quotient[t, 2]+2]]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 100}] (* JeanFrançois Alcover, Feb 15 2017, translated from Maple *)


CROSSREFS

Cf. A227344, A186053 (smallest perimeter among all sets of nonnegative integers).
Sequence in context: A083245 A111610 A119816 * A068794 A130065 A079881
Adjacent sequences: A227535 A227536 A227537 * A227539 A227540 A227541


KEYWORD

nonn,look,hear


AUTHOR

Alois P. Heinz, Jul 16 2013


STATUS

approved



