login
A289183
a(n) is the greatest m such that 2*H(n) > H(m), where H(n) is the n-th harmonic number.
4
3, 10, 21, 35, 53, 74, 99, 128, 160, 196, 235, 277, 324, 374, 427, 484, 545, 609, 676, 748, 822, 901, 983, 1068, 1157, 1250, 1346, 1446, 1549, 1656, 1766, 1880, 1998, 2119, 2244, 2372, 2504, 2639, 2778, 2921, 3067, 3216, 3369, 3526, 3686, 3850, 4018, 4189
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Harmonic Number
FORMULA
From Jon E. Schoenfield, Jul 13 2017: (Start)
It seems that, for the vast majority of values of n > 1, f(n) = floor(n^2 * exp(gamma + 1/n) - C), where gamma is the Euler-Mascheroni constant (A001620) and C = 1/2 + (1/6)*exp(gamma) = 0.7968454029983663308727506838511965915282742..., is equal to a(n); f(n) = a(n) for all n in [2..10000] except n=66: f(66)=7876, but a(66)=7875. [Thanks to Vaclav Kotesovec for identifying the value of C.]
Is there any n > 66 at which f(n) and a(n) differ?
(End)
From Vaclav Kotesovec, Jul 17 2017: (Start)
f(39087) = 2721180603, but a(39087) = 2721180602;
f(517345) = 476697560917, but a(517345) = 476697560916;
f(2013005) = 7217245877275, but a(2013005) = 7217245877274;
No other such numbers below 10000000.
(End)
After 2013005, the only other numbers n < 4*10^9 at which f(n) and a(n) differ are 10240491 and 80968833. - Jon E. Schoenfield, Aug 05 2017
MATHEMATICA
s = HarmonicNumber@ Range[10^4]; Table[Position[s, k_ /; k < 2 HarmonicNumber@ n][[-1, 1]], {n, 48}] (* Michael De Vlieger, Jun 27 2017 *)
(* The following program searches for such n that f(n) <> a(n) *)
f[n_] := Floor[n^2*E^(EulerGamma + 1/n) - (1/2 + (1/6)*E^(EulerGamma))];
harmonic[n_] := Log[n] + EulerGamma + 1/(2 n) - Sum[BernoulliB[2 k]/(2 k*n^(2 k)), {k, 1, 10}];
Select[Range[100000], 2*harmonic[#] < harmonic[f[#]] &]
(* Vaclav Kotesovec, Jul 17 2017 *)
PROG
(PARI) a(n) = {my(m=1); hn = sum(k=1, n, 1/k); hm = 1; until(hm > 2*hn, m++; hm+=1/m); m--; } \\ Michel Marcus, Jul 19 2017
(Python)
from sympy import harmonic
def a(n):
hn2 = 2 * harmonic(n)
m = n
while harmonic(m) <= hn2: m += 1
return m - 1
print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Mar 10 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Joseph Wheat, Jun 27 2017
EXTENSIONS
More terms from Michael De Vlieger, Jun 27 2017
STATUS
approved