0,4

Robert Israel, Table of n, a(n) for n = 0..10000

I would very much like a g.f. for this sequence!

f:= proc(n) option remember; local i, j;

i:= ilog2(n);

j:= n - 2^i;

if j = 2^i-1 then procname(j)+procname(j+1)+1 else procname(j)+procname(j+1) fi

end proc:

f(0):= 0: f(1):=1: f(2):= 1:

map(f, [$0..100]); # Robert Israel, Oct 30 2017

Cf. A151843-A151874.

Sequence in context: A074585 A183312 A108038 * A230448 A201653 A230765

Adjacent sequences: A151842 A151843 A151844 * A151846 A151847 A151848

nonn

N. J. A. Sloane, Jul 17 2009

Name corrected by Robert Israel, Oct 30 2017

approved