OFFSET
1,2
COMMENTS
Conjecture: a(n) ~ n^2/3 as n -> infinity. - Robert Israel, Jun 11 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 100: # to get a(1)..a(N)
A:= Vector(N): A[1]:= 1:
for n from 2 to N do
R:= select(t -> igcd(n, A[t])=1, [$1..n-1]);
A[n]:= n + max(A[R]);
od:
convert(A, list); # Robert Israel, Jun 11 2017
PROG
(PARI) first(n)=my(v=vector(n), t); v[1]=1; for(i=2, n, t=1; for(k=2, i-1, if(gcd(v[k], i)==1 && v[k]>t, t=v[k])); v[i]=t+i); v \\ Charles R Greathouse IV, Jun 12 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 12 2003
STATUS
approved