login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
Records occur at a(2^(i+1) - 2) = i.
For i>0, a(2^i + 1) = floor((i+1)/2).
EXAMPLE
Suppose n=8. We consider:
i=1, min{wt(1), wt(7)} = min{1,3} = 1,
i=2, min{wt(2), wt(6)} = min{1,2} = 1,
i=3, min{wt(3), wt(5)} = min{2,2} = 2,
i=4, min{wt(4), wt(4)} = min{1,1} = 1,
and the maximal value is 2, so a(8) = 2.
MAPLE
(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;
CROSSREFS
Cf. A000120.
Sequence in context: A156642 A360821 A155124 * A283876 A365663 A067754
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 30 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 10:25 EDT 2024. Contains 372131 sequences. (Running on oeis4.)