%I #5 Mar 30 2012 18:39:22
%S 1,2,3,3,4,5,6,7,8,8,9,10,11,11,12,13,14,14,15,15,16,17,18,18,19,20,
%T 21,22,23,23,24,25,26,26,27,27,28,29,30,31,32,32,33,34,35,35,36,36,37,
%U 38,39,39,40,41,42,42,43,44,45,46,47,47,48,49,50,50,51,51,52,53,54,55,56
%N a(1)=1, a(2n)=a(2n-1)+(a(n)mod 2), a(2n+1)=a(2n)+1.
%C a(4*n)=3*n iff b(2n)=0 where b(1)=1, b(2n)=(b(2n-1)+b(n)) mod 2, b(2n+1)=b(2n)+1
%F a(n) is asymptotic to 3/4*n.
%o (PARI) a(n)=if(n<2,1,if(n%2,a(n-1)+1,a(n-1)+a(n/2)%2))
%K nonn
%O 1,2
%A _Benoit Cloitre_, Mar 13 2004