%I #8 Sep 17 2015 04:39:17
%S 1,1,3,4,1,7,7,5,9,11,3,5,7,9,15,8,5,3,19,7,11,23,7,24,5,17,7,14,9,29,
%T 31,11,17,39,11,2,3,5,39,19,7,41,11,29,23,47,15,55,49,17,11,25,17,59,
%U 7,3,29,19,19,30,29,23,63,29,11,21,35,23,39,69,23,36,5,49,3,23,5,77
%N Minimum number of 6's such that n*[n; 6, ..., 6, n] = [x; ..., x] for some x, where [...] denotes simple continued fractions.
%C Sequence A213895 lists fixed points of this sequence.
%t f[m_, n_] := Block[{c, k = 1}, c[x_, y_] := ContinuedFraction[x FromContinuedFraction[Join[{x}, Table[m, {y}], {x}]]]; While[First@ c[n, k] != Last@ c[n, k], k++]; k]; f[6, #] & /@ Range[2, 120] (* _Michael De Vlieger_, Sep 16 2015 *)
%o (PARI) cf(v)={t=v[#v];forstep(i=#v-1,1,-1,t=v[i]+1/t);t}
%o A262216(n,d=6)=for(k=1,9e9,(c=contfrac(cf(vector(k+2,i,if(i>1&&i<k+2,d,n)))*n))[1]==c[#c]&&return(k))
%Y Cf. A213648, A262212 - A262220, A213900, A262211.
%Y Cf. A000057, A213891 - A213899, A261311: fixed points of the above.
%K nonn
%O 2,3
%A _M. F. Hasler_, Sep 15 2015