OFFSET
1,1
LINKS
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)
FORMULA
a(a(n)) = 3*n+1, n >= 1.
PROG
(PARI) {a=2; m=[2]; for(n=2, 68, print1(a, ", "); a=a+1; if(m[1]==n, while(a%3!=1, a++); m=if(length(m)==1, [], vecextract(m, "2..")), if(a%3==1, a++)); m=concat(m, a))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 08 2003
EXTENSIONS
More terms and PARI code from Klaus Brockhaus, Mar 08 2003
STATUS
approved