OFFSET
0,3
COMMENTS
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.
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.
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.
EXAMPLE
a(2) = 3. As 2 has two divisors, a(2) = a(1) + 2 = 1 + 2 = 3.
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.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Aug 03 2020
STATUS
approved