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.

A151755 a(n) = 0 for n <= 4; for n >= 5, write n = 2^i + j, 0 <= j < 2^i; if j <= 2^i-2 then a(n) = 2*a(j) + a(j+1); if j = 2^i-1 then a(n) = 2*a(j) + a(j+1) + 1.

This page as a plain text file.
%I A151755 #2 Mar 30 2012 16:51:06
%S A151755 0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,3,0,0,0,0,0,0,1,2,0,0,0,0,0,1,5,7,0,0,
%T A151755 0,0,0,0,1,2,0,0,0,0,0,1,5,6,0,0,0,0,0,1,4,4,0,0,0,0,1,7,17,15,0,0,0,
%U A151755 0,0,0,1,2,0,0,0,0,0,1,5,6,0,0,0,0,0,1,4,4,0,0,0,0,1,7,17,14,0,0,0,0,0,1,4
%N A151755 a(n) = 0 for n <= 4; for n >= 5, write n = 2^i + j, 0 <= j < 2^i; if j <= 2^i-2 then a(n) = 2*a(j) + a(j+1); if j = 2^i-1 then a(n) = 2*a(j) + a(j+1) + 1.
%e A151755 May be written as a triangle:
%e A151755 .0,
%e A151755 .0,
%e A151755 .0, 0,
%e A151755 .0, 0, 0, 1,
%e A151755 .0, 0, 0, 0, 0, 0, 1, 3,
%e A151755 .0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 5, 7,
%e A151755 .0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 5, 6, 0, 0, 0, 0, 0, 1, 4, 4, 0, 0, 0, 0, 1, 7, 17, 15,
%e A151755 ....
%e A151755 The rows converge to A151756.
%p A151755 f:=proc(n) option remember; local i,j;
%p A151755 if (n <= 4) then RETURN(0); fi;
%p A151755 i:=floor(log(n)/log(2)); j:=n-2^i;
%p A151755 if (j < 2^i-1) then RETURN(2*f(j)+f(j+1)); fi;
%p A151755 RETURN(2*f(j)+f(j+1)+1); end proc;
%p A151755 [seq(f(n),n=0..256);
%Y A151755 Cf. A151756, A151795.
%K A151755 nonn,tabf
%O A151755 0,16
%A A151755 _N. J. A. Sloane_, Jun 21 2009