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 A352026 #56 Mar 03 2022 15:22:00 %S A352026 1,2,12,50,37,483,229,785,2059,4806,23251,56470,327690,813351,734186, %T A352026 2643630,10476269,67340402,268822185,102740092,618260119,2491694355, %U A352026 7222972533,50525424196,44010188391,164490666033,131444704333,548839044705,1808874061272,9913711133738 %N A352026 a(n) is the nearest integer to 1/(H(k) - n), where H(k) is the smallest harmonic number that exceeds n. %C A352026 The k-th harmonic number, H(k), is Sum_{j=1..k} 1/j. A002387(n) is the smallest k such that H(k) > n. %H A352026 Peter Luschny, <a href="/A352026/b352026.txt">Table of n, a(n) for n = 0..100</a> %F A352026 a(n) = round(1/(H(A002387(n)) - n)). %e A352026 H(2) = 1/1 + 1/2 = 3/2 = 1.5; %e A352026 H(3) = 1/1 + 1/2 + 1/3 = 11/6 = 1.8333...; %e A352026 H(4) = 1/1 + 1/2 + 1/3 + 1/4 = 25/12 = 2.08333..., which is the first harmonic number that exceeds 2, so a(2) = round(1/(25/12 - 2)) = round(1/(1/12)) = 12. %e A352026 H(10) = 7381/2520 = 2.92896...; %e A352026 H(11) = 83711/27720 = 3.01987..., which is the first harmonic number > 3, and the fractional part of 83711/27720 = 551/27720, so a(3) = round(27720/551) = round(50.30852...) = 50. %o A352026 (PARI) a(n)={my(s=0,k=0); while(s<=n, k++;s+=1/k); round(1/(s-n))} \\ _Andrew Howroyd_, Mar 01 2022 %o A352026 (SageMath) %o A352026 RR = RealField(1000) %o A352026 def A352026(n): %o A352026 g = RR.euler_constant() %o A352026 u = exp(RR(n) - g) %o A352026 a = u + RR(3/2) - RR(1/(24*u)) + RR(3/(640*u^3)) %o A352026 h = RR(psi(RR(floor(a)))) + g %o A352026 return round(RR(1/(h - RR(n)))) %o A352026 print([A352026(n) for n in range(30)]) # _Peter Luschny_, Mar 03 2022 %Y A352026 Cf. A001008, A002805, A002387. %K A352026 nonn %O A352026 0,2 %A A352026 _Sebastian F. Orellana_, Feb 28 2022 %E A352026 More terms from _Peter Luschny_, Mar 01 2022