login
A089641
Number of k, 1<=k<=n, such that the number of elements in the continued fraction for n/k is maximum.
0
1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 4, 2, 2, 3, 1, 4, 2, 5, 3, 3, 2, 2, 2, 1, 2, 2, 4, 1, 2, 4, 2, 4, 1, 1, 4, 1, 2, 2, 3, 2, 2, 1, 2, 2, 4, 2, 4, 8, 1, 1, 5, 2, 4, 2, 8, 6, 5, 2, 1, 2, 2, 3, 2, 3, 4, 1, 3, 1, 2, 2, 7, 5, 2, 1, 2, 2, 2, 8, 2, 2, 4, 2, 1, 5, 2, 4, 4, 4, 2, 6, 2, 8, 2, 6, 6, 1, 2, 2, 2
OFFSET
1,2
PROG
(PARI) a(n)=sum(s=1, n, if(length(contfrac(n/s))-vecmax(vector(n, i, length(contfrac(n/i)))), 0, 1))
CROSSREFS
Cf. A084242.
Sequence in context: A350239 A268059 A037226 * A086995 A220492 A229873
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 01 2004
STATUS
approved