%I #23 Dec 28 2019 00:17:33
%S 0,42,261,490,494,5447,10023,18519,33543,34292,62263,62267,113405,
%T 113406,199251,199252,199504,2060609,2060610,2060612,2060614,2060616,
%U 2060617,2060618,2060701,11526662,11526664,11526665,11526667,11526670,11526840,11526842,11526845,11526855,20389507
%N Smallest integer in Recamán's sequence (A005132) to appear n times.
%H Jud McCranie, <a href="/A064369/b064369.txt">Table of n, a(n) for n = 1..74</a>
%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>
%t a = {1}; Do[ If[ a[ [ -1 ] ] - n > 0 && Position[ a, a[ [ -1 ] ] - n ] == {}, a = Append[ a, a[ [ -1 ] ] - n ], a = Append[ a, a[ [ -1 ] ] + n ] ], {n, 2, 10^5} ]; b = Sort[ a ]; Do[ k = 1; While[ b[ [ k ] ] != b[ [ k + n ] ], k++ ]; Print[ b[ [ k ] ] ], {n, 1, 13} ]
%Y Cf. A005132.
%K nice,nonn
%O 1,2
%A _Robert G. Wilson v_, Sep 26 2001
%E a(15)-a(35) by _Jud McCranie_, Dec 21 2019