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.

A301984 a(n) is the greatest positive number k such that the binary digits of any number in the interval 1..k appear in order but not necessarily as consecutive digits in the binary representation of n.

This page as a plain text file.
%I A301984 #15 Jul 09 2020 08:58:35
%S A301984 1,2,1,2,3,3,1,2,5,6,3,4,3,3,1,2,5,6,5,6,7,7,3,4,7,7,3,4,3,3,1,2,5,6,
%T A301984 5,6,11,11,5,6,13,14,7,8,7,7,3,4,9,10,7,8,7,7,3,4,7,7,3,4,3,3,1,2,5,6,
%U A301984 5,6,11,11,5,6,13,14,11,12,11,11,5,6,13,14
%N A301984 a(n) is the greatest positive number k such that the binary digits of any number in the interval 1..k appear in order but not necessarily as consecutive digits in the binary representation of n.
%C A301984 Equivalently, a(n) is the greatest positive number k such that A301983(n, k) = k.
%C A301984 Apparently, the k-th record value is A089633(k), and the first term with this value has index A048678(A089633(k)).
%H A301984 Rémy Sigrist, <a href="/A301984/b301984.txt">Table of n, a(n) for n = 1..10000</a>
%H A301984 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A301984 a(n) <= A301977(n).
%F A301984 a(2*n) >= a(n).
%F A301984 a(2*n + 1) >= a(n) (with strict inequality if a(n) is even).
%F A301984 a(n) = 1 iff n is positive and belongs to A000225.
%e A301984 The 13th row of A301983 is: 1, 2, 3, 5, 6, 7, 13; all numbers in the range 1..3 appear in this row, but the number 4 is missing; hence a(13) = 3.
%o A301984 (PARI) a(n) = my (b=binary(n), s=Set(1)); for (i=2, #b, s = setunion(s, Set(apply(v -> 2*v+b[i], s)))); for (u=1, oo, if (!setsearch(s,u), return (u-1)))
%Y A301984 Cf. A048678, A089633, A261461, A301977, A301983.
%K A301984 nonn,base
%O A301984 1,2
%A A301984 _Rémy Sigrist_, Mar 30 2018