A335372 a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) - A001065(n) if nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + A001065(n), where A001065(n) is the sum of the proper divisors of n.
0, 1, 2, 3, 6, 5, 11, 10, 17, 13, 21, 20, 4, 5, 15, 24, 9, 8, 29, 28, 50, 39, 25, 26, 62, 56, 40, 27, 55, 54, 12, 13, 44, 59, 79, 66, 121, 120, 98, 81, 31, 30, 84, 83, 43, 76, 102, 101, 177, 169, 126, 105, 151, 150, 216, 199, 135, 112, 80, 81, 189, 188, 154, 113, 176, 157, 235, 234, 292
Offset: 0
Keywords
Examples
a(2) = 2. As 2 is prime A001065(2) = 1, and 1 has previously appeared, a(2) = a(1) + 1 = 2. a(4) = 6. As A001065(4) = 1+2 = 3, and 0 has previously appeared, a(4) = a(3) + 3 = 6. a(5) = 5. As 5 is prime A001065(5) = 1, and 5 has not previously appeared, a(5) = a(4) - 1 = 5.
Comments