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
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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) = numerator of (the n-th harmonic number minus 1).
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
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