Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A138033
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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
1
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; listen)
OFFSET

1,6

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: A030547 A156642 A155124 this_sequence A067754 A025851 A125688

Adjacent sequences: A138030 A138031 A138032 this_sequence A138034 A138035 A138036

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), May 30 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research