login
A031529
Numbers k such that the continued fraction for sqrt(k) has even period and if the last term of the periodic part is deleted the central term is 31.
0
963, 967, 971, 983, 991, 1003, 1019, 1031, 1039, 1051, 1059, 1063, 1087, 3848, 3880, 3904, 3936, 3944, 4000, 4040, 4072, 4168, 4192, 4256, 4264, 4288, 4320, 4328, 4352, 8655, 8727, 8787, 8871, 8943, 9003, 9147, 9303, 9375, 9663, 9795, 15384, 15448
OFFSET
1,1
MATHEMATICA
epct31Q[n_]:=Module[{cf=ContinuedFraction[Sqrt[n]], cf2}, If[Length[cf] ==1, cf2={1}, cf2=cf[[2]]]; EvenQ[Length[ cf2]] && cf2[[Length[cf2]/2]] == 31]; Select[ Range[16000], epct31Q] (* Harvey P. Dale, Dec 07 2012 *)
CROSSREFS
Sequence in context: A393861 A158414 A031740 * A347884 A031709 A158413
KEYWORD
nonn
STATUS
approved