OFFSET
3,1
PROG
(PARI) \ Farey sequence of order n fareyct(n) = { forprime(x=2, n, y = farey(x); \ print1(y", "); ) } farey(n) = { c=0; m=n*(n-2)+2; a=vector(m); forprime(x=1, n, forprime(y=x, n, v = x/y; if(v<1, c++; a[c]=v; ) ) ); a = vecsort(a); c=0; for(x=2, m, if(a[x]<>a[x-1] & a[x]<>0, print1(numerator(a[x])", "); c++; ) ); return(c) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Aug 17 2003
STATUS
approved