OFFSET
1,2
PROG
(PARI) a(n) = {my(m=n*(n-1)/2, v); forstep(k=m+n/(2-n%2), oo, n, v=List([]); for(i=2, k-m, if(gcd(n, i)==1, listput(v, i))); if(#v>n-2, forsubset([#v, n-1], w, if(r=1+sum(i=1, n-1, v[w[i]])==k, return(k))))); } \\ Jinyuan Wang, May 23 2020
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amarnath Murthy, Mar 27 2003
EXTENSIONS
a(8)-a(11) from Jinyuan Wang, May 23 2020
STATUS
approved