cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A327007 a(n) = number of iterations of f(x)=floor((x^2+n)/(2x)) starting at x=n to reach the value floor(sqrt(n)) (=A000196(n)).

Original entry on oeis.org

0, 1, 2, 1, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4
Offset: 1

Views

Author

Max Alekseyev, Aug 12 2019

Keywords

Comments

Also, we have f(x) = floor((x + floor(n/x))/2).
Notice that f(n) = f(1) = floor((n+1)/2), and so the starting value x = 1 gives the same sequence.
Iterations f(f(...f(a))...) reach floor(sqrt(n)) for any starting integer a >= 1. They either stabilize to floor(sqrt(n)) or alternate between floor(sqrt(n)) and ceiling(sqrt(n)).

Crossrefs

Programs

  • PARI
    { A327007(n,a=n) = my(k = 0); while(1, my(b = (a+n\a)\2); if(b >= a,break); a = b; k++); k; }

A327008 a(n) = number of iterations of f(x)=floor((x^2+n^2)/(2x)) starting at x=n^2 to reach the value n.

Original entry on oeis.org

0, 1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9
Offset: 1

Views

Author

Max Alekseyev, Aug 12 2019

Keywords

Crossrefs

Formula

a(n) = A327007(n^2).

A327009 Indices of records in A327007.

Original entry on oeis.org

1, 2, 3, 8, 24, 48, 120, 360, 1088, 3135, 9999, 31328, 103040, 342224, 1151328, 3920399, 13571855, 47416995, 166642280, 590733024, 2105524995, 7553695743, 27244473480, 98709700760, 359212031648, 1312529961648
Offset: 1

Views

Author

Max Alekseyev, Aug 12 2019

Keywords

Comments

a(n) = smallest m such that A327007(m) = n-1.

Crossrefs

Formula

For n >= 6, a(n) = A327010(n-1)^2 - 1.
Showing 1-3 of 3 results.