OFFSET
1,2
LINKS
Peter Munn, Table of n, a(n) for n = 1..5000
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, arXiv:math/0305308 [math.NT], 2003.
FORMULA
a(n) - n is periodic with period 648.
MATHEMATICA
a[n_] := a[n] = If[n == 1, 1, If[MemberQ[Array[a, n-1], n], a[n-1] - 3, a[n-1] + 5]]; Array[a, 58] (* Jean-François Alcover, Oct 05 2018 *)
CROSSREFS
AUTHOR
Benoit Cloitre, Apr 05 2003
STATUS
approved