cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213648 The minimum number of 1's in the relation n*[n,1,1,...,1,n] = [x,...,x] between simple continued fractions.

This page as a plain text file.
%I A213648 #46 Sep 17 2015 04:40:04
%S A213648 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,
%T A213648 23,13,59,29,23,19,8,39,11,18,17,27,29,19,23,43,29,59,23,15,11,55,74,
%U A213648 35,41,26,35,9,23,35,41,57,59,14,29,23,47,34,59,67
%N A213648 The minimum number of 1's in the relation n*[n,1,1,...,1,n] = [x,...,x] between simple continued fractions.
%C A213648 Multiplying n by a simple continued fraction with an increasing number of 1's sandwiched between n generates fractions that have a leading term x in their continued fraction, where x is obviously > n^2. We increase the number of 1's until the first and the last term in the simple terminating continued fraction of n*[n,1,...,1,n] =[x,...,x] is the same, x, and set a(n) to the count of these 1's.
%C A213648 Conjecture: the fixed points of this sequence are in A000057.
%C A213648 We have [n,1,1,...,1,n] = n + (n*Fib(m)+Fib(m-1))/(n*Fib(m+1)+Fib(m)) and n*[n,1,1,...,1,n] = n^2 + 1 + (n^2-n-1)*Fib(m)/(n*Fib(m+1)+Fib(m)), where m is the number of 1's. - _Max Alekseyev_, Aug 09 2012
%C A213648 The analog sequence with 11 instead of 1, A213900, seems to have the same fixed points, while other variants (A262212 - A262220, A262211) have other fixed points (A213891 - A213899,  A261311). - _M. F. Hasler_, Sep 15 2015
%D A213648 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.
%H A213648 Bill Gosper, <a href="http://perl.plover.com/yak/cftalk/INFO/gosper.txt">Appendix 2 Continued Fraction Arithmetic</a>
%F A213648 Conjecture: a(n)=A001177(n)-1.
%e A213648 3* [3,1,1,1,3] = [10,1,10],so a(3)=3
%e A213648 4* [4,1,1,1,1,1,4] = [18,2,18],so a(4)=5
%e A213648 5* [5,1,1,1,1,5] = [28,28],so a(5)=4
%e A213648 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
%e A213648 7* [7,1,1,1,1,1,1,1,7] = [53,3,53], so a(7)=7
%p A213648 A213648 := proc(n)
%p A213648         local h,ins,c ;
%p A213648         for ins from 1 do
%p A213648                 c := [n,seq(1,i=1..ins),n] ;
%p A213648                 h := numtheory[cfrac](n*simpcf(c),quotients) ;
%p A213648                 if op(1,h) = op(-1,h) then
%p A213648                         return ins;
%p A213648                 end if;
%p A213648         end do:
%p A213648 end proc: # _R. J. Mathar_, Jul 06 2012
%t A213648 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 *)
%o A213648 (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 */
%o A213648 (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 */
%Y A213648 Cf. A000057, A262212 - A262220.
%K A213648 nonn
%O A213648 2,1
%A A213648 _Art DuPre_, Jun 17 2012