[seqfan] Recaman observation
David Wilson
dwilson at gambitcomm.com
Mon Jul 13 15:20:48 CEST 2009
Recaman's sequence is defined as
a(n) =
0, if n = 0
a(n-1)-n if n > 0, a(n-1)-n >= 0 and a(n-1)-n not already in sequence.
a(n-1)+n otherwise
So Recaman satisfies
[1] a(n) >= 0
[2] |a(n)-a(n-1)| = n
and tries to avoid repeats by greedy choice of a(n) = a(n-1) -+ n.
Recaman also "wants" to be an injection on N = {0, 1, 2, ...}, as it
attempts to avoid repeats by choice of a(n) = a(n-1) + n when a(n) =
a(n-1) - n is a repeat.
Clearly, there are injections satisfying [1] and [2], e.g, a(n) = n(n+1)/2.
Is there a lexicographically smallest injection satisfying [1] and [2]?
More information about the SeqFan
mailing list