login
A262214
Minimum number of 4's such that n*[n; 4, ..., 4, n] = [x; ..., x] for some x, where [...] denotes simple continued fractions.
2
1, 3, 1, 4, 3, 7, 3, 3, 9, 9, 3, 6, 7, 19, 7, 2, 3, 5, 9, 7, 9, 7, 3, 24, 13, 11, 7, 13, 19, 9, 15, 19, 5, 39, 3, 18, 5, 27, 19, 19, 7, 43, 9, 19, 7, 15, 7, 55, 49, 11, 13, 8, 11, 9, 7, 11, 13, 57, 19, 4, 9, 7, 31, 34, 19, 67, 5, 7, 39, 69, 3, 36, 37, 99, 5, 39, 27, 25, 39, 35, 19, 27, 7, 14, 43, 27, 19, 10, 19, 55, 7, 19, 15, 29, 15, 48, 55, 19
OFFSET
2,2
COMMENTS
Sequence A213893 lists fixed points of this sequence.
MATHEMATICA
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[4, #] & /@ Range[2, 120] (* Michael De Vlieger, Sep 16 2015 *)
PROG
(PARI) cf(v)={t=v[#v]; forstep(i=#v-1, 1, -1, t=v[i]+1/t); t}
A262214(n, d=4)=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))
KEYWORD
nonn
AUTHOR
M. F. Hasler, Sep 15 2015
STATUS
approved