OFFSET
0,5
LINKS
Paolo P. Lava, Table of n, a(n) for n = 0..10000
MATHEMATICA
a[0] = 1; a[1] = 1; a[2] = 1; a[3] = 1; a[4] = 2; a[n_] := a[n] = 1 + Mod[Abs[n - 2 + a[n - 2]], n] + Mod[Abs[n - 1 + a[n - 1]], n - 1]; Table[a[n], {n, 0, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 05 2012
STATUS
approved