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.

A245536 Write n>=1 as either n=2^k-2^r with 0 <= r <= k-1, in which case a(2^k-2^r)=k-r-1, or as n=2^k-2^r+j with 2 <= r <= k-1, 1 <= j < 2^r-1, in which case a(2^k-2^r+j)=(k-r-1)*a(j).

This page as a plain text file.
%I A245536 #8 Jul 26 2014 13:40:34
%S A245536 0,0,1,0,0,1,2,0,0,0,0,1,0,2,3,0,0,0,0,0,0,0,0,1,0,0,1,2,0,3,4,0,0,0,
%T A245536 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,2,2,0,0,2,3,0,4,5,0,0,0,0,0,
%U A245536 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,2
%N A245536 Write n>=1 as either n=2^k-2^r with 0 <= r <= k-1, in which case a(2^k-2^r)=k-r-1, or as n=2^k-2^r+j with 2 <= r <= k-1, 1 <= j < 2^r-1, in which case  a(2^k-2^r+j)=(k-r-1)*a(j).
%C A245536 Defined by the recurrence given in A245196, taking G(n)=n (n>=0) and m=1.
%C A245536 Changing G from [0,1,2,3,4,...] to [1,2,3,4,5,6,...] produces A038374.
%p A245536 G:=[seq(n,n=0..30)];
%p A245536 m:=1;
%p A245536 f:=proc(n) option remember; global m,G; local k,r,j,np;
%p A245536    k:=1+floor(log[2](n)); np:=2^k-n;
%p A245536    if np=1 then r:=0; j:=0; else r:=1+floor(log[2](np-1)); j:=2^r-np; fi;
%p A245536    if j=0 then G[k-r-1+1]; else m*G[k-r-1+1]*f(j); fi;
%p A245536 end;
%p A245536 [seq(f(n),n=1..120)];
%Y A245536 Cf. A245196, A038374.
%K A245536 nonn
%O A245536 1,7
%A A245536 _N. J. A. Sloane_, Jul 25 2014