The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A336760 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. 7
 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, 23, 19, 25, 27, 35, 33, 39, 43, 47, 51, 42, 40, 36, 32, 24, 26, 34, 36, 42, 48, 44, 46, 56, 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 (list; graph; refs; listen; history; text; internal format)
 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. LINKS 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 Cf. A005132, A000005, A046522, A336761. Sequence in context: A082817 A084753 A163364 * A082822 A109313 A331526 Adjacent sequences:  A336757 A336758 A336759 * A336761 A336762 A336763 KEYWORD nonn AUTHOR Scott R. Shannon, Aug 03 2020 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 27 04:13 EDT 2021. Contains 346303 sequences. (Running on oeis4.)