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!)
A270826 Maximum number of iterations needed in the Euclid algorithm for gcd(x,y) in [1..n]. 0
0, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
REFERENCES
R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see Theorem 2.1.3 p. 84.
LINKS
FORMULA
a(n) = ceiling(log(n*sqrt(5))/log((sqrt(5)+1)/2)) - 2.
MATHEMATICA
With[{s = Sqrt@ 5}, Table[Ceiling[Log[n s]/Log[(s + 1)/2]] - 2, {n, 89}]] (* Michael De Vlieger, Mar 24 2016 *)
PROG
(PARI) a(n) = ceil(log(n*sqrt(5))/log((sqrt(5)+1)/2)) - 2;
CROSSREFS
Sequence in context: A326539 A297995 A081228 * A363069 A003002 A087180
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 23 2016
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 23 09:48 EDT 2024. Contains 371905 sequences. (Running on oeis4.)