OFFSET
1,5
COMMENTS
It seems that lim n ->infinity a(n)/n = 0.2... << (log(4)-log(3))/log(2) = 0.415... the expected density of 1's (cf. measure theory of continued fraction).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The continued fraction of (3/2)^24 is [16834, 8, 1, 10, 2, 25, 1, 3, 1, 1, 57, 6] which contains 4 "1's", hence a(24)=4.
MATHEMATICA
a[1] = 0; a[n_] := Count[ContinuedFraction[(3/2)^n], 1]; Array[a, 100] (* Amiram Eldar, Sep 05 2020 *)
PROG
(PARI) for(n=1, 200, s=contfrac(frac((3/2)^n)); print1(sum(i=1, length(s), if(1-component(s, i), 0, 1)), ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 13 2002
STATUS
approved