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.

A037013 Reading binary expansion from right to left, run lengths strictly decrease.

This page as a plain text file.
%I A037013 #23 Oct 10 2019 03:55:21
%S A037013 0,1,3,4,7,8,15,16,24,31,32,39,48,63,64,79,96,112,127,128,143,159,192,
%T A037013 224,255,256,287,319,384,399,448,480,511,512,543,575,624,639,768,799,
%U A037013 896,960,1023,1024,1087,1151,1248,1279,1536,1567,1599,1792,1920,1984,2047,2048,2111
%N A037013 Reading binary expansion from right to left, run lengths strictly decrease.
%H A037013 Reinhard Zumkeller, <a href="/A037013/b037013.txt">Table of n, a(n) for n = 1..1000</a>
%H A037013 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%t A037013 Select[Range[0,2200],Min[Differences[Length/@Split[ IntegerDigits[ #,2]]]]>0&] (* _Harvey P. Dale_, Dec 17 2012 *)
%o A037013 (Haskell)
%o A037013 import Data.List (unfoldr, group)
%o A037013 a037013 n = a037013_list !! (n-1)
%o A037013 a037013_list = 0 : filter
%o A037013    (all (< 0) . (\x -> zipWith (-) (tail $ rls x) $ rls x)) [1..] where
%o A037013        rls = map length . group . unfoldr
%o A037013              (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 2)
%o A037013 -- _Reinhard Zumkeller_, Mar 10 2012
%Y A037013 Subsequence of A037014, cf. A037015, A037016.
%K A037013 nonn,easy,base,nice
%O A037013 1,3
%A A037013 _N. J. A. Sloane_
%E A037013 More terms from _Patrick De Geest_, Feb 15 1999
%E A037013 Offset fixed and missing 1024 and 2047 inserted by _Reinhard Zumkeller_, Mar 10 2012