OFFSET
1,2
EXAMPLE
a = 1 counts the denominators in {1/1,2/1} corresponding to the continued fractions [1] and [2]; a(2) = 2 counts the denominators in {1/1,2/1,2/1,3/2,3/1,5/2} corresponding to the continued fractions [1], [2], [1,1], [1,2], [2,1], [2,2].
MATHEMATICA
a[n_] := Length[Sort[Union[Denominator[Map[FromContinuedFraction, Flatten[Map[Tuples[{1, 2}, #] &, Range[n]], 1]]]]]]; Table[a[n], {n, 1, 12}]
PROG
(Sage)
import itertools
def a(n):
ans = set()
for k in range(1, n+1):
for p in itertools.product([1, 2], repeat=k):
ans.add(continued_fraction(p).value().denominator())
return len(ans) # Robin Visser, Nov 19 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 04 2013
EXTENSIONS
a(23)-a(30) from Robin Visser, Nov 19 2023
STATUS
approved