OFFSET
0,3
COMMENTS
Also, a(n) is smallest nonnegative integer which is consistent with sequence being monotonically increasing and satisfying a(a(n)) = n^2.
LINKS
Ivan Neretin, Table of n, a(n) for n = 0..10000
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 (math.NT/0305308)
MATHEMATICA
a = {1, 3}; Do[AppendTo[a, If[MemberQ[a, n], Position[a, n][[1, 1]]^2, a[[-1]] + 1]], {n, 3, 58}]; Prepend[a, 0] (* Ivan Neretin, Jul 09 2015 *)
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane and Matthew Vandermast, Feb 04 2003
STATUS
approved