login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331960 Integers whose square root has a continued fraction [b(0);[b(1),...,b(p)]] with a period p > 2 such that b(1)=b(2)=...=b(p-1). 1
7, 13, 32, 41, 55, 58, 74, 75, 130, 135, 136, 180, 185, 215, 269, 312, 335, 346, 370, 377, 425, 427, 458, 557, 560, 646, 697, 711, 818, 819, 880, 925, 986, 987, 1064, 1067, 1129, 1130, 1272, 1313, 1325, 1326, 1400, 1462, 1490, 1495, 1613, 1714, 1736, 1885 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Any periodic continued fraction represents a rational number, in particular [b(0);[c,c,...,c,b(p)]]. An integer requires b(p)=2*b(0). The exclusion of p < 3 makes sense because there should be at least two constant c-terms. Note that, with m=a0, the terms associated with the continued fractions [m;[2m]] (p=1) and [m;[c,2m]] (p=2) are those in A320773.
General aspect: If [m;[c,c,...,c,2m]] is an integer, it belongs to a quadratic subsequence, see link "Special periodic continued fractions".
The four sequences below, see formula, cover 336 of the first 500 terms.
LINKS
FORMULA
Formulas for some quadratic subsequences:
p,c formula first term a(1) thru a(500)
(k=1) frequency
4,1 (3k-1)^2 + 4k-1 a(1) = 7 125
5,1 (5k-2)^2 + 6k-2 a(2) = 13 75
3,2 (5k+1)^2 + 4k+1 a(4) = 41 74
4,2 (6k+1)^2 + 5k+1 a(5) = 55 62
EXAMPLE
7 = [2; [1, 1, 1, 4]]
13 = [3; [1, 1, 1, 1, 6]]
32 = [5; [1, 1, 1, 10]]
41 = [6; [2, 2, 12]]
55 = [7; [2, 2, 2, 14]]
MATHEMATICA
a:={}; For[k=0, k<2000, k++, b:=Last[ContinuedFraction[Sqrt[k]]]; p:=Length[b]; If[p>2, For[i=2, i<p&& Extract[b, 1]==Extract[b, i], i++, If[i==p-1, AppendTo[a, k]]]]]; a (* Stefano Spezia, Feb 04 2020 *)
PROG
(Maxima) block([an: 2, n: 0, nmax: 100],
/*transfers the first nmax terms to a file in the current directory*/
fl: openw(concat("terms-A331960-", nmax, ".txt")),
while n<nmax do
(an: an+1, w: sqrt(an), m: floor(w),
if w > m and mod(2*m, an-m^2)>0 then
(a: m, i: 0, x: w, ok: true,
while a<2*m and ok do
(i: i+1, x: 1/(x-floor(x)),
a: floor(x),
if i=1 then c: a
elseif a # c and a<2*m then ok: false),
if ok then(n: n+1, printf( fl, "~d, ", an)))),
close(fl));
CROSSREFS
Cf. A320773.
Sequence in context: A053183 A247955 A026318 * A061204 A334783 A060983
KEYWORD
nonn
AUTHOR
Gerhard Kirchner, Feb 02 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)