editing
approved
editing
approved
Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 17.
998 and 1006 removed, sequence extended - _by _R. J. Mathar_, Sep 06 2009
approved
editing
editing
approved
Numbers k such that continued fraction of (1+Sqrt[sqrt(k]))/2 has period 17.
a(1) = 521 because continued fraction of (1+Sqrt[sqrt(521]))/2 = 11, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, ... has period (1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21) length 17.
s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 500}]; bb = {}; Do[If[aa[[n]] == 17, AppendTo[bb, n]], {n, 1, Length[aa]}]; bb (*Artur Jasinski*)
proposed
editing
editing
proposed
Numbers k such that continued fraction of (1+Sqrt[k])/2 has period 17.
a(1) = 521 because continued fraction of (1+Sqrt[521])/2 = 11, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, ... has period (1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21) length 17.
has period (1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21) length 17
approved
editing
_Artur Jasinski (grafix(AT)csl.pl), _, Oct 30 2008
A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic', 'quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146340 := proc(n) RETURN(A146326(n) = 17) ; end: for n from 2 do if isA146340(n) then printf("%d, \n", n) ; fi; od: [From _R. J. Mathar (mathar(AT)strw.leidenuniv.nl), _, Sep 06 2009]
998 and 1006 removed, sequence extended - _R. J. Mathar (mathar(AT)strw.leidenuniv.nl), _, Sep 06 2009
521, 617, 709, 998, 10061433, 1597, 2549, 2909, 2965, 3161, 3581, 3821, 4013, 4285, 4649
A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic', 'quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146340 := proc(n) RETURN(A146326(n) = 17) ; end: for n from 2 do if isA146340(n) then printf("%d, \n", n) ; fi; od: [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2009]
more,nonn,new
998 and 1006 removed, sequence extended - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Sep 06 2009
Numbers k such that continued fraction of (1+Sqrt[k])/2 has period 17
521, 617, 709, 998, 1006
1,1
For primes in this sequence see A146362.
a(1) = 521 because continued fraction of (1+Sqrt[521])/2 = 11, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5,...
has period (1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21) length 17
s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 500}]; bb = {}; Do[If[aa[[n]] == 17, AppendTo[bb, n]], {n, 1, Length[aa]}]; bb (*Artur Jasinski*)
more,nonn
Artur Jasinski (grafix(AT)csl.pl), Oct 30 2008
approved