OFFSET
1,5
COMMENTS
Terms are always odd.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Amiram Eldar, Plot of Sum_{k=1..n} a(n)/(n*log(n)) for n = 100..100000
FORMULA
Sum_{k=1..n} a(k) seems to be asymptotic to c*n*log(n) with c around 1.
EXAMPLE
The continued fraction for floor(128*phi)/128 is [1, 1, 1, 1, 1, 1, 1, 2, 1, 2] with 7 consecutive 1's, thus a(128) = 7.
MATHEMATICA
a[1] = 1; a[n_] := -1 + FirstPosition[ContinuedFraction[Floor[n*GoldenRatio]/n], _?(# > 1 &)][[1]]; Array[a, 100] (* Amiram Eldar, May 08 2022 *)
PROG
(PARI) a(n)=if(n<2, 1, s=1; while(component(contfrac(floor(n*(1+sqrt(5))/2)/n), s)==1, s++); s-1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 22 2005
STATUS
approved