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.

A089311 Write n in binary; a(n) = number of 0's in rightmost block of zeros, after dropping any trailing 0's.

This page as a plain text file.
%I A089311 #18 May 12 2014 21:30:52
%S A089311 0,0,0,0,0,1,0,0,0,2,1,1,0,1,0,0,0,3,2,2,1,1,1,1,0,2,1,1,0,1,0,0,0,4,
%T A089311 3,3,2,1,2,2,1,2,1,1,1,1,1,1,0,3,2,2,1,1,1,1,0,2,1,1,0,1,0,0,0,5,4,4,
%U A089311 3,1,3,3,2,2,1,1,2,1,2,2,1,3,2,2,1,1,1,1,1,2,1,1,1,1,1,1,0,4,3,3
%N A089311 Write n in binary; a(n) = number of 0's in rightmost block of zeros, after dropping any trailing 0's.
%H A089311 Harvey P. Dale, <a href="/A089311/b089311.txt">Table of n, a(n) for n = 0..1000</a>
%e A089311 9 = 1001 so a(9) = 2.
%t A089311 bd[n_]:=Module[{s=Split[IntegerDigits[n,2]]},Which[Length[s]<3,0,MemberQ[ Last[s],1],Length[s[[-2]]],True,Length[s[[-3]]]]]; Array[bd,120,0] (* _Harvey P. Dale_, Dec 29 2013 *)
%o A089311 (PARI) a(n)=local(b,c,s):b=binary(n):c=length(b):while(!b[c],c=c-1):while(c>0&&b[c],c=c-1): if(c<=0,0,s=0:while(!b[c],c=c-1:s=s+1):s) \\ _Ralf Stephan_
%Y A089311 Cf. A089309-A089313. Different from A086784.
%K A089311 nonn,base
%O A089311 0,10
%A A089311 _N. J. A. Sloane_, Dec 22 2003
%E A089311 More terms from _Ralf Stephan_, Feb 01 2004