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.

A226762 Greatest k such that 1/k >= mean of {1, 1/2, 1/3, ..., 1/n}.

This page as a plain text file.
%I A226762 #23 Nov 03 2024 02:24:19
%S A226762 1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,6,6,6,6,6,7,7,7,7,7,8,8,
%T A226762 8,8,8,8,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,12,
%U A226762 12,13,13,13,13,13,13,14,14,14,14,14,14,15,15
%N A226762 Greatest k such that 1/k >= mean of {1, 1/2, 1/3, ..., 1/n}.
%C A226762 Largest integer not exceeding the harmonic mean of the first n numbers.
%H A226762 Clark Kimberling, <a href="/A226762/b226762.txt">Table of n, a(n) for n = 1..1000</a>
%F A226762 a(n) = floor(n/(Sum_{k=1..n} 1/k)).
%e A226762 1/4 < mean{1,1/2,1/3,...,1/9} < 1/3, so that a(9) = 3.
%t A226762 f[n_] := Mean[Table[1/k, {k, 1, n}]]
%t A226762 Table[Floor[1/f[n]], {n, 1, 120}]   (* this sequence *)
%t A226762 Table[Ceiling[1/f[n]], {n, 1, 120}] (* A226763 *)
%o A226762 (PARI) \\ This uses only precision-independent integer operations:
%o A226762 a(n)=(n*n!)\sum(k=1,n,n!\k)  \\ _Stanislav Sykora_, Apr 08 2015
%Y A226762 Cf. A226763, A256502.
%K A226762 nonn,easy
%O A226762 1,5
%A A226762 _Clark Kimberling_, Jun 19 2013
%E A226762 Name corrected by _Jason Yuen_, Nov 02 2024