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.
%I A368373 #26 Jan 29 2024 10:38:46 %S A368373 1,6,11,50,137,98,363,1522,7129,14762,83711,172042,1145993,2343466, %T A368373 1195757,4873118,42142223,28548602,275295799,22334054,18858053, %U A368373 38186394,444316699,2695645910,34052522467,68791484534,312536252003,630809177806,9227046511387,18609365660294,290774257297357 %N A368373 a(n) = denominator of AM(n)-HM(n), where AM(n) and HM(n) are the arithmetic and harmonic means of the first n positive integers. %H A368373 Paolo Xausa, <a href="/A368373/b368373.txt">Table of n, a(n) for n = 1..2000</a> %e A368373 0, 1/6, 4/11, 29/50, 111/137, 103/98, 472/363, 2369/1522, 12965/7129, 30791/14762, 197346/83711, 452993/172042, 3337271/1145993, 7485915/2343466, 4160656/1195757, 18358463/4873118, ... %p A368373 AM:=proc(n) local i; (add(i,i=1..n)/n); end; %p A368373 HM:=proc(n) local i; (add(1/i,i=1..n)/n)^(-1); end; %p A368373 s1:=[seq(AM(n)-HM(n),n=1..50)]; %t A368373 A368373[n_] := Denominator[(n+1)/2 - n/HarmonicNumber[n]]; %t A368373 Array[A368373, 35] (* _Paolo Xausa_, Jan 29 2024 *) %o A368373 (Python) %o A368373 from fractions import Fraction %o A368373 from itertools import count, islice %o A368373 def agen(): # generator of terms %o A368373 A = H = 0 %o A368373 for n in count(1): %o A368373 A += n %o A368373 H += Fraction(1, n) %o A368373 yield ((A*Fraction(1, n) - n/H)).denominator %o A368373 print(list(islice(agen(), 31))) # _Michael S. Branicky_, Jan 24 2024 %o A368373 (Python) %o A368373 from fractions import Fraction %o A368373 from sympy import harmonic %o A368373 def A368373(n): return (Fraction(n+1,2)-Fraction(n,harmonic(n))).denominator # _Chai Wah Wu_, Jan 25 2024 %o A368373 (PARI) a368373(n) = denominator((n+1)/2 - n/harmonic(n)) \\ _Hugo Pfoertner_, Jan 25 2024 %Y A368373 Cf. A102928/A175441, A368366, A368372. %K A368373 nonn,frac %O A368373 1,2 %A A368373 _N. J. A. Sloane_, Jan 24 2024