login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

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 60, we have over 367,000 sequences, and we’ve crossed 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228805 Number of distinct denominators of rational numbers whose continued fraction consists exclusively of 1s and 2s and has length <=n. 2
1, 2, 4, 8, 14, 26, 45, 85, 155, 286, 540, 1047, 2014, 3939, 7642, 15082, 29601, 58797, 116248, 231530, 459976, 917030, 1826669, 3641525, 7253511, 14463688, 28834305, 57481793, 114543879, 228286471 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
Cf. A228803.
Sequence in context: A027557 A120545 A130708 * A317884 A365253 A054193
KEYWORD
nonn,easy,changed
AUTHOR
Clark Kimberling, Sep 04 2013
EXTENSIONS
a(23)-a(30) from Robin Visser, Nov 19 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 03:27 EST 2023. Contains 367505 sequences. (Running on oeis4.)