%I #13 May 16 2020 02:01:20
%S 1,2,3,1,0,1,2,0,1,1,1,0,0,1,2,0,1,1,1,0,0,0,1,0,1,1,1,0,0,1,2,0,1,1,
%T 1,0,0,0,1,0,1,1,0,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,1,2,0,1,1,1,0,
%U 0,0,1,0,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0,1,0,0
%N a(n) = a(n1)  a(m) for n >= 4, where m = 2^(p+1) + 2  n and p is the unique integer such that 2^p < n  1 <= 2^(p+1), starting with a(1) = 1, a(2) = 2, and a(3) = 3.
%p a := proc(n) option remember;
%p `if`(n < 4, [1,2,3][n], abs(a(n  1)  a(Bits:Iff(n  2$2) + 3  n)))
%p end:
%p seq(a(n), n = 1..90); # _Petros Hadjicostas_, Nov 08 2019
%o (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 3; for(n=4, nn, va[n] = abs(va[n1]  va[2  n + 2*2^logint(n2, 2)])); va; } \\ _Petros Hadjicostas_, May 15 2020
%K nonn
%O 1,2
%A _Clark Kimberling_
%E Name edited by _Petros Hadjicostas_, Nov 08 2019
