login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A110919
Number of consecutive 1's in the continued fraction for floor(n*phi)/n where phi = (1+sqrt(5))/2 (A001622).
1
1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 3, 3, 5, 3, 3, 3, 3, 5, 3, 3, 3, 3, 5, 3, 3, 5, 3, 5, 3, 3, 5, 3, 5, 7, 3, 5, 3, 5, 5, 3, 5, 3, 5, 5, 3, 5, 7, 5, 5, 3, 5, 5, 5, 5, 3, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 7, 5, 5, 9, 5, 5, 5, 5, 7, 5, 5, 5, 5, 7, 5, 5, 7, 5, 5, 5
OFFSET
1,5
COMMENTS
Terms are always odd.
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
Cf. A001622.
Sequence in context: A025810 A001319 A240833 * A281273 A109599 A333752
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 22 2005
STATUS
approved