OFFSET
1,2
EXAMPLE
Continued fraction for 1+1/2+1/3+1/11+1/16 is [1, 1, 74, 2, 3] which contains 5 elements, the continued fraction for 1+1/2+1/3+1/11+1/16+1/17 is [2, 21, 1, 17, 1, 1, 2, 4] which contains 8 elements, hence a(6)=17
PROG
(PARI) a(n)=if(n<0, 0, s=a(n-1)+1; while(length(contfrac(1/s+sum(i=1, n-1, 1/a(i))))<=length(contfrac(sum(i=1, n-1, 1/a(i)))), s++); s)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Nov 09 2002
STATUS
approved