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.

A087118 Numbers having exactly one maximal group of consecutive zeros in binary representation of n.

This page as a plain text file.
%I A087118 #36 Apr 12 2019 08:27:18
%S A087118 0,2,4,5,6,8,9,11,12,13,14,16,17,19,23,24,25,27,28,29,30,32,33,35,39,
%T A087118 47,48,49,51,55,56,57,59,60,61,62,64,65,67,71,79,95,96,97,99,103,111,
%U A087118 112,113,115,119,120,121,123,124,125,126,128,129,131,135,143,159,191
%N A087118 Numbers having exactly one maximal group of consecutive zeros in binary representation of n.
%C A087118 A087116(a(n)) = 1.
%C A087118 a(n) = A043687(n-1) for 1 < n < 1000. - _Georg Fischer_, Oct 19 2018
%H A087118 Gheorghe Coserea, <a href="/A087118/b087118.txt">Table of n, a(n) for n = 1..12343</a>
%H A087118 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A087118 From _Gheorghe Coserea_, Sep 28-30 2015: (Start)
%F A087118 a((n^3 - n)/6 + 2) = 2^n for n >= 1.
%F A087118 a((n^3 - n)/6 + 2 + n) = 2^n + 2^(n-1) for n >= 2.
%F A087118 a((n^3 - n)/6 + 2 + n + n-1) = 2^n + 2^(n-1) + 2^(n-2) for n >= 3.
%F A087118 a(n) < 2*2^((6*n)^(1/3)) and limsup a(n)/2^((6*n)^(1/3)) = 2.
%F A087118 a(n) > 1/2 * 2^((6*n)^(1/3)) for n>=3 and 1/2 <= liminf a(n)/(2^((6*n)^(1/3))) <= 1.
%F A087118 (End)
%p A087118 0, seq(seq(seq(2^n - 2^b + 2^a - 1, a=0..b-1),b=n-1..1,-1),n=0..10); # _Robert Israel_, Oct 01 2015
%t A087118 Table[2^n - 2^b + 2^a - 1, {n, 0, 10}, {b, n-1, 1, -1}, {a, 0, b-1}] // Flatten // Prepend[#, 0]& (* _Jean-François Alcover_, Apr 11 2019, after  _Robert Israel_ *)
%o A087118 (PARI)
%o A087118 num(a,b,c) = (1 << (a+b+c)) - (1 << (b+c)) + (1 << c)  - 1;
%o A087118 succ(a,b,c) = {
%o A087118     if (b > 1, return([a, b-1, c+1]));
%o A087118     if (c > 0, return([a+1, c, 0]));
%o A087118     return([1, a+1, 0]);
%o A087118 };
%o A087118 seq(n) = {
%o A087118     my(a = 1, b = 1, c = 0, v = vector(n));
%o A087118     for (i = 2, n, v[i] = num(a,b,c);
%o A087118          my(x = succ(a,b,c)); a = x[1]; b = x[2]; c = x[3]);
%o A087118     return(v);
%o A087118 };
%o A087118 seq(64)  \\ _Gheorghe Coserea_, Sep 28 2015
%Y A087118 Cf. A007088, A023416, A043687, A087119.
%K A087118 nonn
%O A087118 1,2
%A A087118 _Reinhard Zumkeller_, Aug 14 2003