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.

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.

This page as a plain text file.
%I A368784 #36 Mar 26 2024 17:00:21
%S A368784 1,2,4,7,10,13,17,21,25,30,35,40,45,50,56,62,68,74,81,87,94,101,108,
%T A368784 115,122,130,138,145,153,162,170,178,187,195,204,213,222,231,240,250,
%U A368784 259,269,279,289,298,309,319,329,339,350,361,371,382,393,404,415,427,438
%N 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.
%C A368784 (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.
%H A368784 Felix Huber, <a href="/A368784/b368784.txt">Table of n, a(n) for n = 0..10000</a>
%F A368784 a(n) = floor(-1/2 + sqrt(4*n^3 + 8*n^2 + 4*n + 1)/2) + 1.
%F A368784 a(n) = round(sqrt(n*(n+1)^2 + 1/4)). - _Chai Wah Wu_, Mar 11 2024
%e A368784 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.
%p A368784 A368784 := n -> floor(-1/2 + 1/2*sqrt(4*n^3 + 8*n^2 + 4*n + 1)) + 1;
%p A368784 seq(A368784(n), n = 0 .. 57);
%t A368784 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 *)
%Y A368784 Cf. A003067, A061465, A126022, A130243.
%K A368784 nonn,easy
%O A368784 0,2
%A A368784 _Felix Huber_, Feb 15 2024