login
a(0)=1, a(1)=a(2)=1 and a(3k) = a(k), a(3k+1) = a(k)+a(k+1), a(3k+2) = 2a(k) for k >= 1.
0

%I #4 Jul 10 2012 12:21:32

%S 0,1,1,1,2,2,1,2,2,1,3,2,2,4,4,2,3,4,1,3,2,2,4,4,2,3,4,1,4,2,3,5,6,2,

%T 4,4,2,6,4,4,8,8,4,6,8,2,5,4,3,7,6,4,5,8,1,4,2,3,5,6,2,4,4,2,6,4,4,8,

%U 8,4,6,8,2,5,4,3,7,6,4,5,8,1,5,2,4,6,8,2,5,4,3,8,6,5,11,10,6,8,12,2,6,4,4,8

%N a(0)=1, a(1)=a(2)=1 and a(3k) = a(k), a(3k+1) = a(k)+a(k+1), a(3k+2) = 2a(k) for k >= 1.

%t a[0] = 0; a[1] = 1; a[2] = 1;

%t a[n_] := a[n] = If[Mod[ n, 3] == 0, a[Floor[n/3]], If[Mod[n, 3] == 1, a[Floor[(n - 1)/3]] + a[Floor[(n + 2)/3]], a[Floor[(n - 2)/3]] + a[Floor[n/3]]]];

%t Table[a[n], {n, 0, 200}]

%Y Cf. A002487

%K nonn,easy

%O 0,5

%A _Roger L. Bagula_ and _Gary W. Adamson_, May 24 2010

%E Definition simplified, Mma notation replaced - The Assoc. Eds. of the OEIS, Jul 20 2010