References to A064389

Variation (4) on Recaman's sequence (A005132): to get a(n), we first try to subtract n from a(n-1): a(n) = a(n-1)-n if positive and not already in the sequence; if not then we try to add n: a(n) = a(n-1)+n if not already in the sequence; if this fails we try to subtract n+1 from a(n-1), or to add n+1 to a(n-1), or to subtract n+2, or to add n+2, etc., until one of these produces a positive number not already in the sequence - this is a(n).
1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 44, 19


1 seqfan posts

Fri Mar 12 03:04:10 CET 2010    [seqfan] Re: seqs whose |differences| are 1,2,3,4,...

Index of A-numbers in seqfan: by ascending order    by month    by frequency    by keyword
Links to OEIS content are included according to The OEIS End-User License Agreement .