login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A064169
Numerator - denominator in n-th harmonic number, 1 + 1/2 + 1/3 + ... + 1/n.
11
0, 1, 5, 13, 77, 29, 223, 481, 4609, 4861, 55991, 58301, 785633, 811373, 835397, 1715839, 29889983, 10190221, 197698279, 40315631, 13684885, 13920029, 325333835, 990874363, 25128807667, 25472027467, 232222818803, 235091155703, 6897956948587, 6975593267347
OFFSET
1,3
COMMENTS
The numerator and denominator in the definition have no common factors greater than 1. p divides a(p-2) for prime p > 2. - Alexander Adamchuk, Jun 09 2006
It appears that a(n) = numerator((3*(HarmonicNumber(n) - 1)) / (n*(n^2 + 6*n + 11)), except for n = 5, 82, 115, and 383 (tested to 20000). - Gary Detlefs, Jul 20 2011
From Amiram Eldar and Thomas Ordowski, Jul 27 2019: (Start)
Conjecture: for n > 2, n divides a(n-2) if and only if n is a prime. Checked up to 20000.
Max Alekseyev proved (in priv. commun.) that there are no primes p > 3 such that p^2 divides a(p-2). (End)
LINKS
Eric Weisstein's World of Mathematics, Harmonic Number
FORMULA
Numerator of (gamma + Psi(n+1) - 1). - Vladeta Jovovic, Aug 12 2002
From Alexander Adamchuk, Jun 09 2006: (Start)
a(n) = numerator of Sum_{k = 2..n} 1/k.
a(n) = A001008(n) - A002805(n).
a(n) = numerator of (the n-th harmonic number minus 1).
a(n) = numerator of A001008(n)/A002805(n) - 1. (End)
a(n) = numerator of A027612(n-1)/(A027611(n)*n^2*(n-1)!), n > 1. - Gary Detlefs, Aug 05 2011
a(n) = numerator(Sum_{k = 1..n-1} 1/(3*k + 3)). - Gary Detlefs, Sep 14 2011
a(n) = numerator(Sum_{k = 0..n-1} 2/(k+2)). - Gary Detlefs, Oct 06 2011
a(n) = numerator(Sum_{k = 1..n} frac(1/k)). - Michel Marcus, Sep 27 2021
EXAMPLE
The 3rd harmonic number is 11/6. So a(3) = 11 - 6 = 5.
MAPLE
s := n -> add(1/i, i=2..n): a := n -> numer(s(n)):
seq(a(n), n=1..30); # Zerinvary Lajos, Mar 28 2007
MATHEMATICA
A064169[n_]:= (s = Sum[1/k, {k, n}]; Numerator[s] - Denominator[s]); Table[A064169[n], {n, 35}]
Numerator[Table[Sum[1/k, {k, 2, n}], {n, 35}]] (* Alexander Adamchuk, Jun 09 2006 *)
Numerator[#] - Denominator[#] &/@ HarmonicNumber[Range[35]] (* Harvey P. Dale, Apr 25 2016 *)
Numerator[Accumulate[1/Range[2, 35]]] (* Alonso del Arte, Nov 21 2018 *)
a[n_] := Numerator[PolyGamma[1 + n] + EulerGamma - 1];
Table[a[n], {n, 1, 29}] (* Peter Luschny, Feb 19 2022 *)
PROG
(PARI) a(n) = my(h=sum(i=1, n, 1/i)); numerator(h)-denominator(h) \\ Felix Fröhlich, Jan 14 2019
(Magma) [Numerator(a)-Denominator(a) where a is HarmonicNumber(n): n in [1..35]]; // Marius A. Burtea, Aug 03 2019
(Sage) [numerator(harmonic_number(n)) - denominator(harmonic_number(n)) for n in (1..35)] # G. C. Greubel, Jul 27 2019
(GAP) List([1..35], n-> NumeratorRat(Sum([0..n-2], k-> 2/(k+2))) ); # G. C. Greubel, Jul 27 2019
(Python)
from sympy import harmonic
def A064169(n): return (lambda x: x.p - x.q)(harmonic(n)) # Chai Wah Wu, Sep 27 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 19 2001
EXTENSIONS
One more term from Robert G. Wilson v, Sep 28 2001
More terms from Vladeta Jovovic, Aug 12 2002
STATUS
approved