OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000 (terms 1..1000 from Ivan Neretin)
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
Perhaps this is asymptotic to c_0*n*(1 + c_1/log n + ...), with c_0 near 2 ?
MATHEMATICA
Fold[Append[#1, #1[[-1]] + If[MemberQ[#1, #2], -2, 5]] &, {1}, Range[2, 57]] (* Ivan Neretin, Mar 03 2016 *)
PROG
(PARI)
up_to = 1001;
A080900list(up_to_n) = { my(xs=Map(), v=vector(up_to_n)); mapput(xs, 1, 1); v[1] = 1; for(n=2, up_to_n, v[n] = v[n-1]+if(mapisdefined(xs, n), -2, +5); mapput(xs, v[n], n)); (v); };
v080900 = A080900list(up_to);
A080900(n) = v080900[n]; \\ Antti Karttunen, Jan 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane and Benoit Cloitre, Apr 01 2003
STATUS
approved