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!)
A037016 Numbers n with property that reading binary expansion from right to left (least significant to most significant), run lengths do not decrease. 8
0, 1, 2, 3, 5, 6, 7, 10, 12, 13, 14, 15, 21, 25, 26, 28, 29, 30, 31, 42, 50, 51, 53, 56, 57, 58, 60, 61, 62, 63, 85, 101, 102, 106, 113, 114, 115, 117, 120, 121, 122, 124, 125, 126, 127, 170, 202, 204, 205, 213, 226, 227, 229, 230, 234, 240, 241, 242, 243, 245, 248 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
There are A000041(k) elements of this list consisting of k bits: a partition of k written in nonincreasing order corresponds to the binary expansion which when read left to right has run lengths as listed in the partition (reading left to right forces the initial run to be of 1s). - Jason Kimberley, Feb 08 2013
This sequence is a subsequence of A061854 (if we allow the initial 0 to be represented by the empty bit string). - Jason Kimberley, Feb 08 2013
The positive entries are those n for which row n of A101211 is weakly decreasing. Example: 6 is in the sequence because row 6 of A101211 is [2,1]; 8 is not in the sequence because row 8 of A101211 is [1,3]. - Emeric Deutsch, Jan 21 2018
LINKS
MATHEMATICA
Select[ Range[0, 250], OrderedQ[ Reverse[ Length /@ Split[ IntegerDigits[#, 2] ] ] ]&] (* Jean-François Alcover, Apr 05 2013 *)
PROG
(Haskell)
import Data.List (unfoldr, group)
a037016 n = a037016_list !! (n-1)
a037016_list = 0 : filter
(all (>= 0) . (\x -> zipWith (-) (tail $ rls x) $ rls x)) [1..] where
rls = map length . group . unfoldr
(\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
-- Reinhard Zumkeller, Mar 10 2012
CROSSREFS
Cf. A037015 (subsequence), A037014, A037013.
Sequence in context: A023746 A357425 A090034 * A308981 A239746 A101323
KEYWORD
nonn,easy,base,nice
AUTHOR
EXTENSIONS
More terms from Patrick De Geest, Feb 15 1999
Offset fixed by Reinhard Zumkeller, Mar 10 2012
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 17 22:02 EDT 2024. Contains 371767 sequences. (Running on oeis4.)