OFFSET
1,2
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 1..10000
PROG
(PARI) a(n) = local(x); x = n; forstep (i = n - 1, 2, -1, if (i%2, if (x <= i, x = i + 1 - x), if (x + i > n, x = n + n + 1 - i - x))); x; \\ David Wasserman, Dec 27 2007
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Aug 26 2004
EXTENSIONS
More terms from David Wasserman, Dec 27 2007
STATUS
approved