A262211 Minimum number of 12's such that n*[n; 12, ..., 12, n] = [x; ..., x] for some x, where [...] denotes simple continued fractions.
1, 1, 1, 2, 1, 5, 3, 5, 5, 9, 1, 6, 5, 5, 7, 8, 5, 19, 5, 5, 9, 23, 3, 14, 13, 17, 5, 2, 5, 31, 15, 9, 17, 5, 5, 36, 19, 13, 11, 19, 5, 43, 9, 5, 23, 45, 7, 5, 29, 17, 13, 12, 17, 29, 11, 19, 5, 59, 5, 30, 31, 5, 31, 20, 9, 65, 17, 23, 5, 13, 11, 3, 73, 29, 19, 29, 13, 79, 23, 53, 19, 81, 5, 8, 43, 5, 19, 14, 5, 41, 23, 31, 45, 59, 15, 48, 5, 29
Offset: 2
Keywords
Programs
-
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[12, #] & /@ Range[2, 120] (* Michael De Vlieger, Sep 16 2015 *)
-
PARI
cf(v)={t=v[#v];forstep(i=#v-1,1,-1,t=v[i]+1/t);t} A262211(n,d=12)=for(k=1,9e9,(c=contfrac(cf(vector(k+2,i,if(i>1&&i
Comments