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.

A090050 Numbers having equal length of longest contiguous block of zeros and ones in binary expansion.

This page as a plain text file.
%I A090050 #20 Oct 10 2023 05:13:15
%S A090050 2,5,10,12,19,21,25,38,42,44,50,51,52,56,71,75,76,77,83,85,89,100,101,
%T A090050 102,105,108,113,142,147,150,153,154,155,166,170,172,178,179,180,184,
%U A090050 199,201,202,203,204,205,210,211,212,217,226,227,232,240,271,279,284
%N A090050 Numbers having equal length of longest contiguous block of zeros and ones in binary expansion.
%C A090050 A087117(a(n)) = A038374(a(n)), see also A000975.
%H A090050 Reinhard Zumkeller, <a href="/A090050/b090050.txt">Table of n, a(n) for n = 1..10000</a>
%H A090050 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e A090050 180 -> '10110100' with A087117(180)=2 and A038374(180)=2, therefore 180 is a term.
%t A090050 zobQ[n_]:=Module[{s=Split[IntegerDigits[n,2]]},Max[Length/@Select[ s, MemberQ[ #,0]&]] == Max[Length/@Select[s,MemberQ[#,1]&]]]; Select[ Range[ 300],zobQ] (* _Harvey P. Dale_, Aug 25 2019 *)
%t A090050 Select[Range@1000, (s=Split@IntegerDigits[#,2]; Length@s>1 && Last@Differences@(Length@# & /@ Union@s) == 0) &] (* _Hans Rudolf Widmer_, Oct 10 2023 *)
%o A090050 (Haskell)
%o A090050 a090050 n = a090050_list !! (n+1)
%o A090050 a090050_list = [x | x <- [1..], a087117 x == a038374 x]
%o A090050 -- _Reinhard Zumkeller_, May 01 2012
%Y A090050 Cf. A031443 (binary digitally balanced).
%Y A090050 Cf. A000975, A038374, A087117.
%K A090050 nonn,base
%O A090050 1,1
%A A090050 _Reinhard Zumkeller_, Nov 20 2003
%E A090050 Definition corrected, thanks to _Leroy Quet_. - Sep 17 2008