OFFSET
1,2
COMMENTS
Sequences A169748-A169752 have the same structure. We start with two sequences A and B. Sequence A is taken to be 1,2,3,4,5,6,7,..., while sequence B varies.
Here sequence B is also 1,2,3,4,5,6,7,....
We start with the first term of sequence A (which is 1).
To extend the sequence, we first try to subtract the next term of A from the current term, but that is allowed only if the result is a positive number not already in the sequence.
If that fails, we next try to subtract the next term of B from the current term, but again that is allowed only if the result is a positive number not already in the sequence.
Finally, if that fails, we add the next term of A to the current term (this may produce repeated terms, but that is allowed at this step).
EXAMPLE
Start with 1 from A,
add 2 from A getting 3,
subtract 1 from B getting 2,
add 3 from A getting 5,
add 4 from A getting 9,
subtract 5 from A getting 4,
add 6 from A getting 10,
subtract 2 from B getting 8,
add 7 from A getting 15,
add 9 from A getting 16,
subtract 10 from A getting 6,
add 11 from A getting 17,
subtract 3 from B getting 14,
add 12 from A getting 26,
subtract 13 from A getting 13, ...
CROSSREFS
KEYWORD
nonn
AUTHOR
Rodolfo Kurchan, Apr 08 2010
EXTENSIONS
Extended by D. S. McNeil, May 09 2010
STATUS
approved