login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Minimum number of 5's such that n*[n; 5, ..., 5, n] = [x; ..., x] for some x, where [...] denotes simple continued fractions.
2

%I #8 Sep 17 2015 04:39:25

%S 2,3,5,1,11,5,5,3,5,11,11,2,5,3,11,8,11,19,5,11,11,21,11,9,2,3,5,28,

%T 11,31,23,11,8,5,11,18,59,11,5,6,11,43,11,3,65,47,11,41,29,35,5,12,11,

%U 11,5,19,86,57,11,30,95,11,47,5,11,65,17,43,5,69,11,36,56,19,59,11,11,79,11,11,20,81,11,17,131,115,11,44,11,5,65,31,47,19,23,48

%N Minimum number of 5's such that n*[n; 5, ..., 5, n] = [x; ..., x] for some x, where [...] denotes simple continued fractions.

%C Sequence A213894 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[5, #] & /@ 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 A262215(n,d=5)=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,1

%A _M. F. Hasler_, Sep 15 2015