cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A141822 Maximum term in the continued fraction of A141821(n)/n.

This page as a plain text file.
%I A141822 #17 Nov 01 2023 13:39:27
%S A141822 2,2,3,2,5,2,2,3,3,2,2,2,3,3,3,2,2,2,4,2,3,3,3,3,2,2,4,2,2,2,3,3,2,3,
%T A141822 3,3,4,3,3,2,4,2,2,2,2,2,3,2,2,3,3,3,5,2,3,3,3,3,3,3,3,2,2,2,3,2,2,2,
%U A141822 2,2,3,2,2,2,2,3,3,2,2,2,3,3,3,3,3,3,3,2,4,3,3,3,3,3,4,2,3,2,2,2,3,3,2,2,2
%N A141822 Maximum term in the continued fraction of A141821(n)/n.
%C A141822 Consider the continued fraction [0;c1,c2,...,cm] of k/n, with k<n and gcd(k,n)=1. Let f(k,n) be the maximum of the ci. Then a(n) is the minimum value of f(k,n).
%C A141822 Zaremba conjectured that a(n)<=5, a bound that is attained for n in A195901. It appears that n=150 may be the largest integer with a(n)=5, while n=6234 may be the largest integer with a(n)=4.
%H A141822 Robin Visser, <a href="/A141822/b141822.txt">Table of n, a(n) for n = 2..10000</a> (terms n = 2..2000 from T. D. Noe).
%t A141822 Table[c=ContinuedFraction[Select[Range[n-1],GCD[ #,n]==1&]/n]; Min[Max/@c], {n, 150}]
%o A141822 (PARI) vecmax(v)=my(mx=v[1]); for(i=2,#v,mx=max(mx,v[i])); mx
%o A141822 a(n)=vecmin([vecmax(contfrac(k/n))|k<-[1..n],gcd(k,n)==1]) \\ _Charles R Greathouse IV_, Jul 18 2014
%Y A141822 See A141821 for the least value of k for each n.
%Y A141822 See A141832, A141833, A141823, and A195901 for the integers n>1 such that a(n) = 2, 3, 4, and 5, respectively.
%Y A141822 Cf. A006839 (where cm is constrained to be 1).
%K A141822 nonn
%O A141822 2,1
%A A141822 _T. D. Noe_, Jul 08 2008
%E A141822 Edited by _Max Alekseyev_, Sep 25 2011