reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
If we only require that a(n+1) be either a(n)-n or a(n)+n, is there a sequence that contains every positive integer exactly once? I.e. , can we take a walk on the positive integers, starting at 1 and always moving (either left or right) a distance n on the n-th step, so that we hit every positive integer exactly once?
approved
editing
proposed
approved
editing
proposed
A356080 is targeted to be such a sequence, but starting from 0. Its definition incorporates a limited look-ahead condition that is clearly a necessary condition for the sequence not to encounter a dead end (i.e., be finite) and is conjectured to be a sufficient condition. - Peter Munn, Feb 09 2023
Cf. A356080.
approved
editing
editing
approved
a(1)=1; a(n+1) is either a(n)-n or a(n)+n, where we choose the smallest one which is a positive integer that's not among the values a(1), ..., a(n).
approved
editing
Edited by _Dean Hickerson (dean.hickerson(AT)yahoo.com), _, Dec 18 2002