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-1 of 1 results.

A368784 a(0) = 1. For n > 0, a(n) is the smallest integer k > n such that (Sum_{i = 1..n} i)/(Sum_{i = n + 1..k} i) < 1/n.

Original entry on oeis.org

1, 2, 4, 7, 10, 13, 17, 21, 25, 30, 35, 40, 45, 50, 56, 62, 68, 74, 81, 87, 94, 101, 108, 115, 122, 130, 138, 145, 153, 162, 170, 178, 187, 195, 204, 213, 222, 231, 240, 250, 259, 269, 279, 289, 298, 309, 319, 329, 339, 350, 361, 371, 382, 393, 404, 415, 427, 438
Offset: 0

Views

Author

Felix Huber, Feb 15 2024

Keywords

Comments

(Sum_{i = 1..n} i)/(Sum_{i = n + 1..k} i) = n*(n + 1)/((k - n)*(n + 1 + k)) < 1/n. It follows that k > -1/2 + sqrt(4*n^3 + 8*n^2 + 4*n + 1)/2.

Examples

			a(3) = 7, because (1 + 2 + 3)/(4 + 5 + 6 + 7) = 3/11 < 1/3 and (1 + 2 + 3)/(4 + 5 + 6) = 2/5 > 1/3.
		

Crossrefs

Programs

  • Maple
    A368784 := n -> floor(-1/2 + 1/2*sqrt(4*n^3 + 8*n^2 + 4*n + 1)) + 1;
    seq(A368784(n), n = 0 .. 57);
  • Mathematica
    a[n_]:= Floor[-1/2 + Sqrt[4*n^3 + 8*n^2 + 4*n + 1]/2] + 1; Array[a,58,0] (* Stefano Spezia, Feb 17 2024 *)

Formula

a(n) = floor(-1/2 + sqrt(4*n^3 + 8*n^2 + 4*n + 1)/2) + 1.
a(n) = round(sqrt(n*(n+1)^2 + 1/4)). - Chai Wah Wu, Mar 11 2024
Showing 1-1 of 1 results.