|
|
A031423
|
|
Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted then there are a pair of central terms both equal to 10.
|
|
20
|
|
|
701, 1418, 1493, 2197, 2290, 3257, 4793, 6154, 6466, 8389, 8753, 9577, 9965, 10765, 11257, 11677, 12541, 14218, 14929, 15413, 15658, 16001, 16501, 17009, 17786, 18049, 18314, 18581, 19121, 21577, 22157, 22745, 24557, 24677, 25805, 26561, 27530, 28517
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[OddQ[len] && c[[2, (len + 1)/2]] == 10 && c[[2, (len + 1)/2 - 1]] == 10, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014; corrected by Georg Fischer, Jun 23 2019 *)
|
|
PROG
|
(Python)
from sympy.ntheory.continued_fraction import continued_fraction_periodic
for n in range(1, 10**4):
cf = continued_fraction_periodic(0, 1, n)
if len(cf) > 1 and len(cf[1]) > 1 and len(cf[1]) % 2 and cf[1][len(cf[1])//2] == 10:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|