OFFSET
1,4
COMMENTS
FORMULA
a(n) = denominator(Sum_{k=1..n} (-1)^(k+1)/k) - numerator(Sum_{k=1..n} (-1)^(k+1)/k).
a(n) = A075829(n+1).
a(n) = numerator(Sum_{k=2..n} (-1)^k/k). (Cf. A024168.) - Petros Hadjicostas, May 17 2020
MATHEMATICA
Denominator[Table[Sum[(-1)^(k+1)/k, {k, 1, n}], {n, 1, 30}]]-Numerator[Table[Sum[(-1)^(k+1)/k, {k, 1, n}], {n, 1, 30}]]
PROG
(PARI) a(n) = my(x=sum(k=1, n, (-1)^(k+1)/k)); denominator(x) - numerator(x); \\ Michel Marcus, May 07 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alexander Adamchuk, Jul 22 2006
STATUS
approved