%I #11 Apr 14 2023 02:12:23
%S 0,1,1,1,2,2,2,3,3,4,5,4,5,6,5,7,7,7,8,8,9,10,11,8,11,12,11,12,13,14,
%T 11,15,16,14,14,17,17,16,18,18,18,19,19,20,21,22,23,16,25,25,21,24,27,
%U 24,25,28,25,28,27,28,29,30,23,31,34,28,32,35,30,30,34,34,33,35
%N a(n) = n - Q(n), where Q(n) is Hofstadter's Q-sequence A005185.
%C Just as for A005185, it is not known if this sequence exists for all n.
%F For n >= 3, a(n) = a(a(n-1)+1) + a(a(n-2)+2) - a(n-1) - a(n-2) + n - 3. - _Chai Wah Wu_, Apr 13 2023
%o (Python)
%o from functools import lru_cache
%o @lru_cache(maxsize=None)
%o def A239913(n): return n-1 if n<=2 else A239913(a:=1+A239913(n-1))+A239913(b:=2+A239913(n-2))-a-b+n # _Chai Wah Wu_, Apr 13 2023
%Y Cf. A005185.
%K nonn
%O 1,5
%A _N. J. A. Sloane_, Apr 09 2014