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.

A037016 Numbers n with property that reading binary expansion from right to left (least significant to most significant), run lengths do not decrease.

This page as a plain text file.
%I A037016 #43 Oct 10 2019 03:55:32
%S A037016 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,
%T A037016 58,60,61,62,63,85,101,102,106,113,114,115,117,120,121,122,124,125,
%U A037016 126,127,170,202,204,205,213,226,227,229,230,234,240,241,242,243,245,248
%N A037016 Numbers n with property that reading binary expansion from right to left (least significant to most significant), run lengths do not decrease.
%C A037016 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
%C A037016 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
%C A037016 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
%H A037016 Reinhard Zumkeller, <a href="/A037016/b037016.txt">Table of n, a(n) for n = 1..10000</a>
%H A037016 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%t A037016 Select[ Range[0, 250], OrderedQ[ Reverse[ Length /@ Split[ IntegerDigits[#, 2] ] ] ]&] (* _Jean-François Alcover_, Apr 05 2013 *)
%o A037016 (Haskell)
%o A037016 import Data.List (unfoldr, group)
%o A037016 a037016 n = a037016_list !! (n-1)
%o A037016 a037016_list = 0 : filter
%o A037016    (all (>= 0) . (\x -> zipWith (-) (tail $ rls x) $ rls x)) [1..] where
%o A037016        rls = map length . group . unfoldr
%o A037016              (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
%o A037016 -- _Reinhard Zumkeller_, Mar 10 2012
%Y A037016 Cf. A037015 (subsequence), A037014, A037013.
%K A037016 nonn,easy,base,nice
%O A037016 1,3
%A A037016 _N. J. A. Sloane_
%E A037016 More terms from _Patrick De Geest_, Feb 15 1999
%E A037016 Offset fixed by _Reinhard Zumkeller_, Mar 10 2012