%I A138033
%S A138033 0,1,1,1,1,2,1,2,2,2,2,2,2,3,2,2,2,3,2,3,3,3,2,3,3,3,3,3,3,4,2,3,3,3,3,
%T A138033 3,3,4,3,3,3,4,3,4,4,4,3,3,3,4,3,4,4,4,3,4,4,4,4,4,4,5,3,3,3,4,3,4,4,4,
%U A138033 3,4,4,4,4,4,4,5,3,4,4,4,4,4,4,5,4,4,4,5,4,5,5,5,3,4,4,4,4,4,4,5,4,4,4
%N A138033 a(n) = max_{ 1 <= i <= n-1 } min{ wt(i), wt(n-i) }, where wt() = A000120()
is the binary weight function; a(1) = 0 by convention.
%F A138033 Records occur at a(2^(i+1) - 2) = i.
%F A138033 For i>0, a(2^i + 1) = floor((i+1)/2).
%e A138033 Suppose n=8. We consider:
%e A138033 i=1, min{wt(1), wt(7)} = min{1,3} = 1,
%e A138033 i=2, min{wt(2), wt(6)} = min{1,2} = 1,
%e A138033 i=3, min{wt(3), wt(5)} = min{2,2} = 2,
%e A138033 i=4, min{wt(4), wt(4)} = min{1,1} = 1,
%e A138033 and the maximal value is 2, so a(8) = 2.
%p A138033 (First load "wt" from A000120) f:=proc(n) local i,j,k; if n=1 then RETURN(0);
fi; j:=0; for i from 1 to floor(n/2) do k := min( wt(i), wt(n-i)
); if k > j then j:=k; fi; od: RETURN(j); end;
%Y A138033 Cf. A000120.
%Y A138033 Sequence in context: A030547 A156642 A155124 this_sequence A067754 A025851
A125688
%Y A138033 Adjacent sequences: A138030 A138031 A138032 this_sequence A138034 A138035
A138036
%K A138033 nonn,easy
%O A138033 1,6
%A A138033 N. J. A. Sloane (njas(AT)research.att.com), May 30 2008
|