%I #9 May 15 2020 13:04:10
%S 1,1,1,0,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,1,0,1,1,1,0,1,
%T 0,1,1,0,0,1,1,1,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,1,1,0,1,1,0,1,0,1,0,1,
%U 1,0,0,1,1,1,0,0,1,0,0,0,1,0,0,1,1,1,0,1,1,1
%N a(n) = |a(n-1) - a(m)| for n >= 4, where m = n - 1 - 2^p and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = a(3) = 1.
%o (PARI) lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 1; for(n=4, nn, va[n] = abs(va[n-1] - va[n - 1 - 2^logint(n-2, 2)])); va; } \\ _Petros Hadjicostas_, May 15 2020
%K nonn
%O 1,1
%A _Clark Kimberling_
|