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.

A227568 Largest k such that a partition of n into distinct parts with boundary size k exists.

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