%I #25 May 21 2018 15:12:05
%S 0,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,
%T 6,6,6,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,
%U 9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10
%N Largest k such that a partition of n into distinct parts with boundary size k exists.
%C The boundary size is the number of parts having fewer than two neighbors.
%H Alois P. Heinz, <a href="/A227568/b227568.txt">Table of n, a(n) for n = 0..2000</a>
%F a(n) = max { k : A227345(n,k) > 0 } = max { k : A227551(n,k) > 0 }.
%F a(n) = floor(2*sqrt(n/3)).
%p b:= proc(n, i, t) option remember; `if`(n=0, `if`(t>1, 1, 0),
%p `if`(i<1, 0, max(`if`(t>1, 1, 0)+b(n, i-1, iquo(t, 2)),
%p `if`(i>n, 0, `if`(t=2, 1, 0)+b(n-i, i-1, iquo(t, 2)+2)))))
%p end:
%p a:= n-> b(n$2, 0):
%p seq(a(n), n=0..100);
%t b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t > 1, 1, 0], If[i < 1, 0, Max[If[t > 1, 1, 0] + b[n, i - 1, Quotient[t, 2]], If[i > n, 0, If[t == 2, 1, 0] + b[n - i, i - 1, Quotient[t, 2] + 2]]]]];
%t a[n_] := b[n, n, 0];
%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, May 21 2018, translated from Maple *)
%Y Where records occur: A077043.
%Y Cf. A227345, A227551.
%K nonn
%O 0,4
%A _Alois P. Heinz_, Jul 16 2013