%I #10 Sep 12 2022 10:10:07
%S 1,1,2,2,2,3,4,4,4,4,5,5,6,7,8,8,8,8,8,9,9,9,10,10,11,12,12,13,14,15,
%T 16,16,16,16,16,16,17,17,17,17,18,18,18,19,19,20,21,21,21,22,22,23,24,
%U 24,25,26,27,27,28,29,30,31,32,32,32,32,32,32,32,33,33,33,33,33,34,34,34
%N a(n) = a(a(n-1)) + a(n - 1 - a(n-1)) with a(1) = a(2) = 1.
%F From _Peter Bala_, Sep 11 2022: (Start)
%F a(n) = n + 1 - A004001(n+1).
%F a(n) = A080677(n+1) - 1.
%F a(n+1) - a(n) = 0 or 1. (End)
%p A087816 := proc(n) option remember; if n <= 2 then 1 else procname(procname(n-1)) + procname(n - 1 - procname(n-1)); fi; end;
%p seq(A087816(n), n = 1..100); # _Peter Bala_, Sep 11 2022
%t hg[n_Integer?Positive] := hg[n] =hg[hg[n-1]] + hg[n -1- hg[n-1]] hg[1] = hg[2] = 1 digits=2^8 a=Table[hg[n], {n, 1, digits}]
%Y Cf. A004001, A055748, A080677, A087815.
%K nonn,easy
%O 1,3
%A _Roger L. Bagula_, Oct 05 2003