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 A058312 #55 Feb 16 2025 08:32:43 %S A058312 1,2,6,12,60,60,420,840,2520,2520,27720,27720,360360,360360,72072, %T A058312 144144,2450448,2450448,46558512,232792560,232792560,232792560, %U A058312 5354228880,5354228880,26771144400,26771144400,80313433200,11473347600 %N A058312 Denominator of the n-th alternating harmonic number, Sum_{k=1..n} (-1)^(k+1)/k. %C A058312 a(n) is a divisor of A003418(n). The first time this is a proper divisor, is a(15); see A269626. - _Jeppe Stig Nielsen_, Mar 01 2016 %H A058312 T. D. Noe and Robert Israel, <a href="/A058312/b058312.txt">Table of n, a(n) for n = 1..2000</a> (1..200 from T. D. Noe) %H A058312 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HarmonicNumber.html">Harmonic Number</a> %F A058312 G.f. for A058313(n)/ A058312(n): log(1+x)/(1-x). - _Benoit Cloitre_, Jun 15 2003 %F A058312 a(n) = n*a(n-1)/gcd(n*a(n-1), n*A058313(n-1)+(-1)^(n-1)*a(n-1)). - _Robert Israel_, Jul 05 2015 %F A058312 a(n) = the (reduced) denominator of the continued fraction 1/(1 + 1^2/(1 + 2^2/(1 + 3^2/(1 + ... + (n-1)^2/(1))))). - _Peter Bala_, Feb 18 2024 %e A058312 1, 1/2, 5/6, 7/12, 47/60, 37/60, 319/420, 533/840, 1879/2520, ... %p A058312 A058313 := n->denom(add((-1)^(k+1)/k,k=1..n)); %p A058312 # Alternatively: %p A058312 a := n -> denom(harmonic(n) - harmonic((n-modp(n,2))/2)): %p A058312 seq(a(n), n=1..28); # _Peter Luschny_, May 03 2016 %t A058312 a[n_] := Sum[(-1)^(k+1)/k, {k, 1, n}]; Table[a[n] // Denominator, {n, 1, 30}] (* _Jean-François Alcover_, May 26 2015 *) %t A058312 a[n_]:= (-1)^n(HarmonicNumber[n/2-1/2]-HarmonicNumber[n/2]+(-1)^n Log[4])/2; Table[a[n] // FullSimplify, {n, 1, 29}] // Denominator (* _Gerry Martens_, Jul 05 2015 *) %t A058312 Rest[Denominator[CoefficientList[Series[Log[1 + x]/(1 - x),{x, 0, 33}], x]]] (* _Vincenzo Librandi_, Jul 06 2015 *) %o A058312 (PARI) a(n)=denominator(polcoeff(-log(1-x)/(x+1)+O(x^(n+1)),n)) %o A058312 (PARI) a(n)=denominator(sum(k=1,n,(-1)^(k+1)/k)) \\ _Jeppe Stig Nielsen_, Mar 01 2016 %o A058312 (Haskell) %o A058312 import Data.Ratio((%), denominator) %o A058312 a058312 n = a058312_list !! (n-1) %o A058312 a058312_list = map denominator $ scanl1 (+) $ %o A058312 map (1 %) $ tail a181983_list %o A058312 -- _Reinhard Zumkeller_, Mar 20 2013 %Y A058312 Numerators are A058313. Cf. A025530. %Y A058312 Cf. A002805 (denominator of n-th harmonic number). %Y A058312 Cf. A121594, A181983, A003418, A269626. %K A058312 nonn,frac,nice,easy %O A058312 1,2 %A A058312 _N. J. A. Sloane_, Dec 09 2000