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!)
A320773 Numbers (excluding squares) whose square root has a continued fraction with a period < 3. 2
2, 3, 5, 6, 8, 10, 11, 12, 15, 17, 18, 20, 24, 26, 27, 30, 35, 37, 38, 39, 40, 42, 48, 50, 51, 56, 63, 65, 66, 68, 72, 80, 82, 83, 84, 87, 90, 99, 101, 102, 104, 105, 110, 120, 122, 123, 132, 143, 145, 146, 147, 148, 150, 152, 156, 168, 170, 171, 182, 195, 197, 198, 200 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The Heron sequence of every number a(n) has the following relationship: numerator(h(k))^2 - a(n)*denominator(h(k))^2 = 1 for k > 1.
The Heron sequence of every number a(n) has the following relationship with the continued fraction f(s) convergent to sqrt(a(n)): h(k) = f(2^k-1).
From Gerhard Kirchner, Jan 17 2020: (Start)
Numbers k = m^2 + r with m > 0 and 0 < r <= 2m such that r is a divisor of 2m.
Continued fraction: k = [m; 2m/r, 2m, 2m/r, 2m, ...].
The number of terms that are between m^2 and (m+1)^2 is equal to the number of divisors of 2m, which is A099777(m).
Proof see link. The Maxima code below demonstrates the divisor property. Note that there is no divisor of 2m between m and 2m.
(End)
LINKS
Gerhard Kirchner, Divisor property of a(n)
EXAMPLE
The continued fraction of sqrt(6) = 2 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + 1/(2 + 1/(4 + ...)))))) = [2; 2, 4, 2, 4, 2, 4, ...] has repeating portion (2, 4) with period 2, so 6 is a term.
MAPLE
Digits:=40: nr:=0:
for z from 2 to 200 do
test:=true: c:=sqrt(z):
if (c=floor(c)) the test:=false: end if:
while (test=true) do
b[0]:=floor(c):
r[0]:=c:
for k from 1 to 2 do
r[k]:=evalf(1/(r[k-1]-b[k-1])):
b[k]:=floor(r[k]):
end do:
if (b[1]=2*b[0]) or (b[2]=2*b[0]) then nr:=nr+1: a[nr]:=z: printf("%4d", z): end if:
test:=false:
end do:
end do:
MATHEMATICA
Select[Range[200], !IntegerQ[Sqrt[#]] && Length@ContinuedFraction[Sqrt[#]][[-1]]<3 &] (* Amiram Eldar, Nov 01 2018 *)
PROG
(Maxima)
block([n: 2, m: 0, r: 0, k: 0, kmax: 10, v: ""],
while k<kmax do
(m: floor(sqrt(n)), r: n-m^2,
if mod(2*m, r)=0 then (k: k+1, print(n)),
if r= m then n: n+m else (if r= 2*m then n: n+2 else n: n+1)));
/* Gerhard Kirchner, Jan 17 2020 */
CROSSREFS
Sequence in context: A131614 A275202 A233592 * A138390 A257804 A285209
KEYWORD
nonn
AUTHOR
Paul Weisenhorn, Oct 21 2018
EXTENSIONS
Edited by Jon E. Schoenfield, Oct 19 2019
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 March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)