%I #7 Mar 30 2012 18:39:17
%S 2,2,2,3,5,3,6,4,8,5,5,7,6,6,12,9,7,8,8,11,46,9,10,10,18,14,12,11,12,
%T 12,22,13,14,15,74,14,15,15,29,16,31,22,18,17,34,18,18,19,34,20,106,
%U 27,21,21,21,24,118,22,122,24,24,24,25,33,49,26,46,28,26,27,27,31,29,28,55,30
%N Least k such that the continued fraction for n/k contains no element >2.
%C a(n)>n iff n is in A055114. Note that there are very few composites in A055114 : 529,851...are the first.
%o (PARI) a(n)=if(n<0,0, s=1; while(abs(vecmax(contfrac(n/s))-2)>0, s++); s)
%Y Cf. A055114.
%K nonn
%O 1,1
%A _Benoit Cloitre_, Apr 23 2003
|