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.

A175356 Those positive integers n where, when written in binary, there are exactly k number of runs (of either 0's or 1's) each of exactly k length, for all k where 1<=k<=m, for some positive integer m.

This page as a plain text file.
%I A175356 #26 Aug 05 2021 13:19:12
%S A175356 1,19,25,27,8984,8988,9016,9100,9112,9116,9784,10008,10012,10040,
%T A175356 12568,12572,12600,12680,12686,12728,12740,12742,12744,12750,12760,
%U A175356 12764,12856,13192,13198,13240,13880,14104,14108,14136,14476,14488,14492,14532,14534,14536
%N A175356 Those positive integers n where, when written in binary, there are exactly k number of runs (of either 0's or 1's) each of exactly k length, for all k where 1<=k<=m, for some positive integer m.
%C A175356 A "run" of 0's is not immediately bounded by any 0's, and a "run" of 1's is not immediately bounded by any 1's.
%C A175356 There are exactly (m*(m+1)/2)! / Product_{k=1 to m} k! numbers in the sequence each of m^3/3 + m^2/2 + m/6 binary digits, for all m >= 1, and none of any other number of binary digits.
%C A175356 A005811(a(n)) is triangular, i.e., in A000217. - _Michael S. Branicky_, Jan 19 2021
%H A175356 Rémy Sigrist, <a href="/A175356/b175356.txt">Table of n, a(n) for n = 1..12664</a>
%H A175356 Rémy Sigrist, <a href="/A175356/a175356.gp.txt">PARI program for A175356</a>
%e A175356 9016 in binary is 10001100111000. There is exactly one run of one binary digit, two runs of two binary digits, and three runs of three binary digits. (Note that it doesn't matter if the runs are of 0's or of 1's.) So, 9016 is in the sequence.
%o A175356 (PARI) \\ See Links section.
%o A175356 (Python)
%o A175356 from itertools import groupby
%o A175356 def ok(n):
%o A175356   runlens = [len(list(g)) for k, g in groupby(bin(n)[2:])]
%o A175356   return all(runlens.count(k) == k for k in range(1, max(runlens)+1))
%o A175356 def aupto(limit): return [m for m in range(1, limit+1) if ok(m)]
%o A175356 print(aupto(14536)) # _Michael S. Branicky_, Jan 19 2021
%Y A175356 Cf. A000330, A022915, A175061, A175357.
%Y A175356 Cf. A005811, A000217.
%K A175356 base,nonn
%O A175356 1,2
%A A175356 _Leroy Quet_, Apr 22 2010
%E A175356 More terms from _Rémy Sigrist_, Feb 06 2019