login
a(1) = 1 and for n>1: a(n) = n + Max{a(k): k<n, gcd(n,a(k))=1}.
1

%I #11 Jun 12 2017 00:44:08

%S 1,3,4,7,12,13,20,21,29,39,50,41,63,55,56,79,96,97,116,117,137,159,

%T 182,161,207,233,260,261,289,319,350,351,383,417,452,419,489,527,566,

%U 567,608,569,651,695,653,741,788,743,837,887,938,939,992,941,1047

%N a(1) = 1 and for n>1: a(n) = n + Max{a(k): k<n, gcd(n,a(k))=1}.

%C Conjecture: a(n) ~ n^2/3 as n -> infinity. - _Robert Israel_, Jun 11 2017

%H Robert Israel, <a href="/A083561/b083561.txt">Table of n, a(n) for n = 1..10000</a>

%p N:= 100: # to get a(1)..a(N)

%p A:= Vector(N): A[1]:= 1:

%p for n from 2 to N do

%p R:= select(t -> igcd(n,A[t])=1, [$1..n-1]);

%p A[n]:= n + max(A[R]);

%p od:

%p convert(A,list); # _Robert Israel_, Jun 11 2017

%o (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

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jun 12 2003