Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Jan 09 2021 21:05:06
%S 0,1,3,5,2,4,8,6,10,7,11,9,15,13,17,21,16,14,20,18,12,16,20,22,30,27,
%T 23,19,25,27,35,33,39,43,47,51,42,40,36,32,24,26,34,36,42,48,44,46,56,
%U 53,59,55,49,51,59,63,71,67,71,69,57,59,63,69,62,58,50,52,58,54,62,60,72,70,66,72
%N a(0) = 0; for n > 0, a(n) = a(n-1) - tau(n) if nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + tau(n), where tau(n) is the number of divisors of n.
%C This sequences uses the same rules as Recamán's sequence A005132 except that, instead of adding or subtracting n each term, the number of divisors of n is used. See A000005.
%C For the first 10 million terms the smallest value not appearing is 28. The data indicate that a(n)/n approaches 1 as n goes to infinity. As tau(n) <= 2*sqrt(n) (see A046522), it implies that 28 and other small unvisited values will never be visited.
%C In the same range the maximum value is a(9998226) = 10987569, and 2202001 terms repeat a previously visited value, the first time this occurs is a(21) = a(16) = 16. The longest run of consecutive increasing terms is 30, starting at a(1115610) = 1217112, while the longest run of consecutive decreasing terms is 534, starting at a(9960335) = 10946233.
%H <a href="/index/Rea#Recaman">Index entries for sequences related to Recamán's sequence</a>.
%e a(2) = 3. As 2 has two divisors, a(2) = a(1) + 2 = 1 + 2 = 3.
%e a(4) = 2. As 4 has three divisors, and as 2 has not been previously visited and is nonnegative, a(4) = a(3) - 3 = 5 - 3 = 2.
%Y Cf. A005132, A000005, A046522, A336761.
%K nonn
%O 0,3
%A _Scott R. Shannon_, Aug 03 2020