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!)
A361381 In continued fraction convergents of sqrt(d), where d=A005117(n) (squarefree numbers), the position of a/b where abs(a^2 - d*b^2) = 1 or 4. 0
2, 4, 1, 2, 1, 4, 2, 1, 6, 2, 6, 4, 1, 1, 2, 8, 4, 4, 2, 1, 2, 2, 3, 2, 10, 12, 4, 2, 1, 4, 6, 7, 6, 3, 4, 1, 2, 10, 2, 6, 8, 7, 5, 2, 4, 4, 1, 2, 1, 10, 2, 5, 8, 4, 16, 4, 11, 1, 2, 12, 2, 9, 6, 5, 2, 6, 9, 6, 10, 10, 4, 1, 2, 12, 10, 3, 6, 4, 14, 9, 4, 18, 4, 4, 2, 1, 2, 3, 20, 10, 4, 5, 8, 10, 10, 18, 2, 22 (list; graph; refs; listen; history; text; internal format)
OFFSET
5,1
COMMENTS
The golden ratio is the fundamental unit for sqrt(5), but 1/1 isn't a convergent, so this sequence starts with squarefree number A005117(5)=6.
LINKS
EXAMPLE
A005117(13)=19. 170^2 - 19*39^2 = 1. The 6th convergent of sqrt(19) is 170/39.
A005117(14)=21. 5^2 - 21*1^2 = 4. The 2nd convergent of sqrt(21) is 5/1.
A005117(15)=22. 197^2 - 22*42^2 = 1. The 6th convergent of sqrt(22) is 197/42.
A005117(16)=23. 24^2 - 23*5^2 = 1. The 4th convergent of sqrt(23) is 24/5.
Corresponding fundamental units are 170+39*sqrt(19), 5+sqrt(21), 197+42*sqrt(22) and 24+5*sqrt(23).
MAPLE
f:= proc(x) local CF, k, v, w;
uses NumberTheory;
CF:= ContinuedFraction(sqrt(x));
for k from 0 do
v:= Convergent(CF, k);
w:= abs(numer(v)^2 - x*denom(v)^2);
if w = 1 or w = 4 then return k+1 fi;
od
end proc:
count:= 0: R:= NULL:
for i from 6 while count < 100 do if NumberTheory:-IsSquareFree(i) then R:= R, f(i); count:= count+1 fi
od:
R; # Robert Israel, Mar 12 2023
MATHEMATICA
(* store A005117 and A107997 first *) Flatten[Table[sqr = Sqrt[A005117[[n]]];
fun = RootReduce[NumberFieldFundamentalUnits[Sqrt[A005117[[n]]]]][[1]];
forcon = If[MemberQ[A107997, A005117[[n]]], RootReduce[2 fun], fun];
converge = Convergents[ContinuedFraction[N[sqr, 140]]];
Flatten[Position[converge, Abs[forcon[[1]]/(forcon[[2]]/ sqr)]]], {n, 4, 101}]]
CROSSREFS
Sequence in context: A265823 A305717 A208645 * A054708 A112229 A087419
KEYWORD
nonn
AUTHOR
Ed Pegg Jr, Mar 09 2023
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 June 28 04:29 EDT 2024. Contains 373761 sequences. (Running on oeis4.)