OFFSET
1,1
COMMENTS
When a(1) = 1, the formula generates the natural numbers.
LINKS
Cody M. Haderlie, Table of n, a(n) for n = 1..1982
EXAMPLE
a(11) = 89
a(T) = a(7) = 22
|12-22| = 10
a(10) = 72
89 + 72 = 161
a(12) = 161
MATHEMATICA
a = {2, 3}; Do[AppendTo[a, a[[n - 1]] + Part[a, #] &@ SelectFirst[ Reverse@ Abs[a - n], 0 < # < n &]], {n, 3, 50}]; a (* Michael De Vlieger, Apr 08 2016 *)
PROG
(PARI) lista(nn) = {va = vector(nn); print1(va[1] = 2, ", "); print1(va[2] = 3, ", "); for (n=3, nn, T = 0; forstep(k = n-1, 1, -1, vabs = abs(n - va[k]); if ((vabs < n) && (vabs > 0), T = k; break); ); va[n] = va[n-1] + va[abs(n-va[T])]; print1(va[n], ", "); ); } \\ Michel Marcus, Apr 08 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Cody M. Haderlie, Apr 05 2016
STATUS
approved