A213648 The minimum number of 1's in the relation n*[n,1,1,...,1,n] = [x,...,x] between simple continued fractions.
2, 3, 5, 4, 11, 7, 5, 11, 14, 9, 11, 6, 23, 19, 11, 8, 11, 17, 29, 7, 29, 23, 11, 24, 20, 35, 23, 13, 59, 29, 23, 19, 8, 39, 11, 18, 17, 27, 29, 19, 23, 43, 29, 59, 23, 15, 11, 55, 74, 35, 41, 26, 35, 9, 23, 35, 41, 57, 59, 14, 29, 23, 47, 34, 59, 67
Offset: 2
Keywords
Examples
3* [3,1,1,1,3] = [10,1,10],so a(3)=3 4* [4,1,1,1,1,1,4] = [18,2,18],so a(4)=5 5* [5,1,1,1,1,5] = [28,28],so a(5)=4 6* [6,1,1,1,1,1,1,1,1,1,1,1,6] = [39,1,2,2,2,1,39], so a(6)=11 7* [7,1,1,1,1,1,1,1,7] = [53,3,53], so a(7)=7
References
- A. Hurwitz, Über die Kettenbrüche, deren Teilnenner arithmetische Reihen bilden, Vierteljahrsschrift der Naturforschenden Gesellschaft in Zürich, Jahrg XLI, 1896, Jubelband II, S. 34-64.
Links
- Bill Gosper, Appendix 2 Continued Fraction Arithmetic
Programs
-
Maple
A213648 := proc(n) local h,ins,c ; for ins from 1 do c := [n,seq(1,i=1..ins),n] ; h := numtheory[cfrac](n*simpcf(c),quotients) ; if op(1,h) = op(-1,h) then return ins; end if; end do: end proc: # R. J. Mathar, Jul 06 2012
-
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[1, #] & /@ Range[2, 67] (* Michael De Vlieger, Sep 16 2015 *)
-
PARI
{a(n) = local(t, m=1); if( n<2, 0, while( t = contfracpnqn( concat( [n, vector(m, i, 1 ), n])), t = contfrac( n * t[1, 1] / t[2, 1]); if( t[1] < n^2 || t[#t] < n^2, m++, break)); m)} /* Michael Somos, Jun 17 2012 */
-
PARI
{a(n) = local(t, m=0); if( n<2, 0, until(t[1]==t[#t], m++; t = contfrac(n^2 + 1 + (n^2-n-1)*fibonacci(m)/(n*fibonacci(m+1)+fibonacci(m))); ); m )} /* Max Alekseyev, Aug 09 2012 */
Formula
Conjecture: a(n)=A001177(n)-1.
Comments