A367578 a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) - CT(a(n-2),a(n-1)) if nonnegative and not already in the sequence, else a(n) = a(n-1) + CT(a(n-2),a(n-1)), where CT(a,b) is the Comma transform (cf. A367360) of a and b.
0, 1, 2, 14, 35, 78, 21, 103, 92, 53, 28, 60, 146, 145, 84, 26, 68, 134, 215, 173, 122, 91, 62, 46, 22, 84, 56, 11, 72, 55, 30, 83, 75, 38, 91, 180, 169, 168, 77, 164, 93, 44, 10, 51, 56, 41, 105, 94, 153, 112, 81, 109, 98, 197, 116, 45, 109, 58, 153, 234, 202, 160, 139, 138, 47, 131, 202, 190
Offset: 0
Examples
a(2) = 2 as CT(a(0),a(1)) = CT(0,1) = 1, so a(2) = a(1) + 1 = 2. a(3) = 14 as CT(a(1),a(2)) = CT(1,2) = 12, so a(3) = a(2) + 12 = 14. a(7) = 21 as CT(a(5),a(6)) = CT(35,78) = 57, so a(7) = a(6) - 57 = 21, as 21 is nonnegative and not already in the sequence.
Links
- Scott R. Shannon, Table of n, a(n) for n = 0..10000.
- Scott R. Shannon, Image of the first 100000 terms. The green line is a(n) = n.
- Scott R. Shannon, Image of the first 10000000 terms.
Comments