%I #25 Jan 08 2021 22:17:27
%S 0,-1,-1,0,2,-3,1,6,12,3,11,0,10,-3,9,-6,8,-9,7,24,42,21,41,18,-6,17,
%T -9,16,-12,15,-15,14,-18,13,45,78,42,77,39,0,38,-3,37,-6,36,-9,35,-12,
%U 34,-15,33,-18,32,-21,31,-24,30,-27,29,-30,28,-33,27,-36,26,-39,25,90,156,87,155,84
%N a(n) is the smallest candidate for the n-th term of Recamán's sequence A005132.
%C For n > 0 and after A005132(n-1) the algorithm of Recamán's sequence first explores if a(n) is a valid number to be its next term. If a(n) is nonnegative and not already in the sequence A005132 then a(n) is accepted, so A005132(n) = a(n), otherwise a(n) is rejected and A005132(n) = A005132(n-1) + n, not a(n).
%C For an illustration of initial terms see the diagram in A334950.
%H Rémy Sigrist, <a href="/A334951/b334951.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>
%F a(0) = 0; for n > 0, a(n) = A005132(n-1) - n.
%Y Bisection of A334950.
%Y Cf. A005132, A334952.
%K sign
%O 0,5
%A _Omar E. Pol_, May 17 2020