OFFSET
1,2
PROG
(PARI) count(v, t, n)=local(r); for(i=1, n, if(v[i]==t, r++)); r
nexta(v, n)=for(i=1, n-1, if(gcd(i, n)==1&&count(v, i, n-1)<v[i], return(i)))
v=vector(100); v[1]=1; v[2]=3; for(n=3, 100, v[n]=nexta(v, n)); v
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Sep 11 2009
STATUS
approved