login
A082408
Least k such that the continued fraction for n/k contains no element > 2.
1
1, 1, 2, 2, 2, 3, 5, 3, 6, 4, 8, 5, 5, 7, 6, 6, 12, 9, 7, 8, 8, 11, 23, 9, 10, 10, 18, 14, 12, 11, 12, 12, 22, 13, 14, 15, 37, 14, 15, 15, 29, 16, 31, 22, 18, 17, 34, 18, 18, 19, 34, 20, 53, 27, 21, 21, 21, 24, 59, 22, 61, 24, 24, 24, 25, 33, 49, 26, 46, 28, 26, 27, 27, 31, 29, 28, 55, 30
OFFSET
1,3
COMMENTS
a(n) >= n iff n is 1 or in A055114. Note that there are very few composites in A055114: 529, 851, ... are the first.
n/3 < a(n) <= n. - David A. Corneth, May 14 2025
LINKS
MATHEMATICA
a[n_] := Module[{k = 1}, While[Max[ContinuedFraction[n/k]] > 2, k++]; k]; Array[a, 100] (* Amiram Eldar, May 14 2025 *)
PROG
(PARI) a(n)=if(n<0, 0, s=1; while(vecmax(contfrac(n/s)) > 2, s++); s) \\ corrected by Amiram Eldar, May 14 2025
CROSSREFS
Cf. A055114.
Sequence in context: A333462 A133850 A160902 * A270566 A182534 A165918
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 23 2003
EXTENSIONS
a(1)-a(2) inserted and data corrected by Amiram Eldar, May 14 2025
STATUS
approved