login
Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 16.
3

%I #20 Mar 31 2020 03:01:41

%S 172,191,217,232,249,310,311,329,343,344,355,369,391,393,416,428,431,

%T 446,496,513,520,524,536,537,550,559,589,647,655,679,682,686,700,704,

%U 748,760,768,775,802,816,848,851,872,927,995,996,1036,1058,1079,1080,1120,1136

%N Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 16.

%C For primes in this sequence see A146361.

%H Amiram Eldar, <a href="/A146339/b146339.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 191 because continued fraction of (1+sqrt(191))/2 = 7, 2, 2, 3, 1, 1, 4, 1, 26, 1, 4, 1, 1, 3, 2, 2, 13, 2, 2, 3, 1, 1, 4, 1, 26, 1, 4, 1, 1, 3, 2, 2, 13, 2, 2, 3, 1, 1, 4, 1, 26... has period (2, 2, 3, 1, 1, 4, 1, 26, 1, 4, 1, 1, 3, 2, 2, 13) length 16.

%p A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end:

%p isA146339 := proc(n) RETURN(A146326(n) = 16) ; end:

%p for n from 2 to 1000 do if isA146339(n) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Sep 06 2009

%t Select[Range[1000], !IntegerQ @ Sqrt[#] && Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] == 16 &] (* _Amiram Eldar_, Mar 31 2020 *)

%Y Cf. A000290, A078370, A146326-A146345, A146348-A146360.

%K nonn

%O 1,1

%A _Artur Jasinski_, Oct 30 2008

%E 311 inserted, sequence extended by _R. J. Mathar_, Sep 06 2009

%E More terms from _Amiram Eldar_, Mar 31 2020