cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A335382 a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) - sigma(n) if nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + sigma(n), where sigma(n) is the sum of the divisors of n.

Original entry on oeis.org

0, 1, 4, 8, 15, 9, 21, 13, 28, 41, 23, 11, 39, 25, 49, 73, 42, 24, 63, 43, 85, 53, 17, 41, 101, 70, 112, 72, 16, 46, 118, 86, 149, 197, 143, 95, 186, 148, 88, 32, 122, 80, 176, 132, 48, 126, 54, 6, 130, 187, 94, 22, 120, 66, 186, 114, 234, 154, 64, 124, 292, 230, 134, 30, 157, 241, 97, 29, 155
Offset: 0

Views

Author

Scott R. Shannon, Aug 16 2020

Keywords

Comments

This sequences uses the same rules as Recamán's sequence A005132 except that, instead of adding or subtracting n each term, the sum of the divisors of n is used. See A000203.
For the first 10 million terms the smallest value not appearing is 76. It is likely that all values are eventually visited, although this is unknown.
In the same range the maximum value is a(9297600) = 93571073, and 402979 terms repeat a previously visited value, the first time this occurs is a(23) = a(9) = 41. The longest run of consecutive increasing terms is 5, starting at a(105187) = 25833, while the longest run of consecutive decreasing terms is 7, starting at a(6826248) = 83016261.

Examples

			a(2) = 4. As sigma(2) = 3, and a(1)<3, a(2) = a(1) + 3 = 4.
a(4) = 15. As sigma(4) = 7, and 1 has previously appeared, a(4) = a(3) + 7 = 15.
a(5) = 9. As sigma(5) = 6, and 9 has not previously appeared, a(5) = a(4) - 6 = 9.
		

Crossrefs