VOOZH
about
URL: https://oeis.org/A058312
⇱ A058312 - OEIS
login
A058312
Denominator of the n-th alternating harmonic number, Sum_{k=1..n} (-1)^(k+1)/k.
47
1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, 360360, 360360, 72072, 144144, 2450448, 2450448, 46558512, 232792560, 232792560, 232792560, 5354228880, 5354228880, 26771144400, 26771144400, 80313433200, 11473347600
(
list
;
graph
;
refs
;
listen
;
history
;
text
;
internal format
)
OFFSET
1,2
COMMENTS
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
LINKS
T. D. Noe and Robert Israel,
Table of n, a(n) for n = 1..2000
(1..200 from T. D. Noe)
Eric Weisstein's World of Mathematics,
Harmonic Number
FORMULA
G.f. for
A058313
(n)/
A058312
(n): log(1+x)/(1-x). -
Benoit Cloitre
, Jun 15 2003
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
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
EXAMPLE
1, 1/2, 5/6, 7/12, 47/60, 37/60, 319/420, 533/840, 1879/2520, ...
MAPLE
A058313
:= n->denom(add((-1)^(k+1)/k, k=1..n));
# Alternative:
a := n -> denom(harmonic(n) - harmonic((n-modp(n, 2))/2)):
seq(a(n), n=1..28); #
Peter Luschny
, May 03 2016
MATHEMATICA
a[n_] := Sum[(-1)^(k+1)/k, {k, 1, n}]; Table[a[n] // Denominator, {n, 1, 30}] (*
Jean-François Alcover
, May 26 2015 *)
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 *)
Rest[Denominator[CoefficientList[Series[Log[1 + x]/(1 - x), {x, 0, 33}], x]]] (*
Vincenzo Librandi
, Jul 06 2015 *)
PROG
(PARI) a(n)=denominator(polcoeff(-log(1-x)/(x+1)+O(x^(n+1)), n))
(PARI) a(n)=denominator(sum(k=1, n, (-1)^(k+1)/k)) \\
Jeppe Stig Nielsen
, Mar 01 2016
(Haskell)
import Data.Ratio((%), denominator)
a058312 n = a058312_list !! (n-1)
a058312_list = map denominator $ scanl1 (+) $
map (1 %) $ tail a181983_list
--
Reinhard Zumkeller
, Mar 20 2013
CROSSREFS
Numerators are
A058313
. Cf.
A025530
.
Cf.
A002805
(denominator of n-th harmonic number).
Cf.
A121594
,
A181983
,
A003418
,
A269626
.
Sequence in context:
A284650
A085911
A211418
*
A003418
A109935
A347304
Adjacent sequences:
A058309
A058310
A058311
*
A058313
A058314
A058315
KEYWORD
nonn
,
frac
,
nice
,
easy
AUTHOR
N. J. A. Sloane
, Dec 09 2000
STATUS
approved