login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A074840 Numerators a(n) of fractions slowly converging to sqrt(2): let a(1) = 0, b(n) = n - a(n); if (a(n) + 1) / b(n) < sqrt(2), then a(n+1) = a(n) + 1, else a(n+1)= a(n). 6
0, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 13, 14, 14, 15, 15, 16, 16, 17, 18, 18, 19, 19, 20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 31, 31, 32, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 39, 40, 41, 41, 42, 42, 43, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

a(n) + b(n) = n and as n -> +infinity, a(n) / b(n) converges to sqrt(2). For all n, a(n) / b(n) < sqrt(2).

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..5000

Heinz H. Bauschke, Minh N. Dao, Scott B. Lindstrom, The Douglas-Rachford algorithm for a hyperplane and a doubleton, arXiv:1804.08880 [math.OC], 2018.

FORMULA

a(1) = 0. b(n) = n - a(n). If (a(n) + 1) / b(n) < sqrt(2), then a(n+1) = a(n) + 1, else a(n+1) = a(n).

a(n) = floor(n*(2-sqrt(2))). - Vladeta Jovovic, Oct 04 2003

a(n) = 2*n - ceiling(n*sqrt(2)). - Clark Kimberling, Sep 09 2011

EXAMPLE

a(6)= 3 so b(6) = 6 - 3 = 3. a(7) = 4 because (a(6) + 1) / b(6) = 4/3 which is < sqrt(2). So b(7) = 7 - 4 = 3. a(8) = 4 because (a(7) + 1) / b(7) = 5/3 which is not < sqrt(2).

MATHEMATICA

Table[Floor[n*(2 - Sqrt[2])], {n, 1, 50}] (* G. C. Greubel, Nov 28 2017 *)

PROG

(PARI) for(n=1, 30, print1(floor(n*(2-sqrt(2))), ", ")) \\ G. C. Greubel, Nov 28 2017

(MAGMA) [Floor(n*(2-Sqrt(2))): n in [1..30]]; // G. C. Greubel, Nov 28 2017

CROSSREFS

Cf. A001601.

Sequence in context: A244224 A259549 A098295 * A064542 A210434 A256502

Adjacent sequences:  A074837 A074838 A074839 * A074841 A074842 A074843

KEYWORD

easy,frac,nonn

AUTHOR

Robert A. Stump (bee_ess107(AT)msn.com), Sep 09 2002

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 23 05:36 EDT 2019. Contains 321422 sequences. (Running on oeis4.)