%I #17 May 06 2022 13:12:15
%S 1,3,1,4,6,14,26,54,105,213,424,850,1697,3392,6776,13540,27052,54157,
%T 108312,216626,433249,866496,1732984,3465956,6931884,13863717,
%U 27727326,55454441,110908456,221816065,443630435,887257486,1774508208
%N a(n) = a(1) + a(2) + ... + 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) = 1, a(2) = 3, and a(3) = 1.
%o (PARI) lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 3; va[3] = 1; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[n - 1 - 2^logint(n-2, 2)]; sa += va[n]; ); va; } \\ _Petros Hadjicostas_, May 03 2020
%Y Cf. A049919 (similar, but with minus a(2*m)), A049966 (similar, but with plus a(m)), A049967 (similar, but with plus a(2*m)).
%K nonn
%O 1,2
%A _Clark Kimberling_
%E Name edited by _Petros Hadjicostas_, Apr 26 2020