cp's OEIS Frontend

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.

A064169 Numerator - denominator in n-th harmonic number, 1 + 1/2 + 1/3 + ... + 1/n.

This page as a plain text file.
%I A064169 #115 Feb 16 2025 08:32:45
%S A064169 0,1,5,13,77,29,223,481,4609,4861,55991,58301,785633,811373,835397,
%T A064169 1715839,29889983,10190221,197698279,40315631,13684885,13920029,
%U A064169 325333835,990874363,25128807667,25472027467,232222818803,235091155703,6897956948587,6975593267347
%N A064169 Numerator - denominator in n-th harmonic number, 1 + 1/2 + 1/3 + ... + 1/n.
%C A064169 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
%C A064169 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
%C A064169 From _Amiram Eldar_ and _Thomas Ordowski_, Jul 27 2019: (Start)
%C A064169 Conjecture: for n > 2, n divides a(n-2) if and only if n is a prime. Checked up to 20000.
%C A064169 _Max Alekseyev_ proved (in priv. commun.) that there are no primes p > 3 such that p^2 divides a(p-2). (End)
%H A064169 Harvey P. Dale, <a href="/A064169/b064169.txt">Table of n, a(n) for n = 1..1000</a>
%H A064169 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HarmonicNumber.html">Harmonic Number</a>
%F A064169 Numerator of (gamma + Psi(n+1) - 1). - _Vladeta Jovovic_, Aug 12 2002
%F A064169 From _Alexander Adamchuk_, Jun 09 2006: (Start)
%F A064169 a(n) = numerator of Sum_{k = 2..n} 1/k.
%F A064169 a(n) = A001008(n) - A002805(n).
%F A064169 a(n) = numerator of (the n-th harmonic number minus 1).
%F A064169 a(n) = numerator of A001008(n)/A002805(n) - 1. (End)
%F A064169 a(n) = numerator of A027612(n-1)/(A027611(n)*n^2*(n-1)!), n > 1. - _Gary Detlefs_, Aug 05 2011
%F A064169 a(n) = numerator(Sum_{k = 1..n-1} 1/(3*k + 3)). - _Gary Detlefs_, Sep 14 2011
%F A064169 a(n) = numerator(Sum_{k = 0..n-1} 2/(k+2)). - _Gary Detlefs_, Oct 06 2011
%F A064169 a(n) = numerator(Sum_{k = 1..n} frac(1/k)). - _Michel Marcus_, Sep 27 2021
%e A064169 The 3rd harmonic number is 11/6. So a(3) = 11 - 6 = 5.
%p A064169 s := n -> add(1/i, i=2..n): a := n -> numer(s(n)):
%p A064169 seq(a(n), n=1..30); # _Zerinvary Lajos_, Mar 28 2007
%t A064169 A064169[n_]:= (s = Sum[1/k, {k, n}]; Numerator[s] - Denominator[s]); Table[A064169[n], {n, 35}]
%t A064169 Numerator[Table[Sum[1/k, {k, 2, n}], {n, 35}]] (* _Alexander Adamchuk_, Jun 09 2006 *)
%t A064169 Numerator[#] - Denominator[#] &/@ HarmonicNumber[Range[35]] (* _Harvey P. Dale_, Apr 25 2016 *)
%t A064169 Numerator[Accumulate[1/Range[2, 35]]] (* _Alonso del Arte_, Nov 21 2018 *)
%t A064169 a[n_] := Numerator[PolyGamma[1 + n] + EulerGamma - 1];
%t A064169 Table[a[n], {n, 1, 29}] (* _Peter Luschny_, Feb 19 2022 *)
%o A064169 (PARI) a(n) = my(h=sum(i=1, n, 1/i)); numerator(h)-denominator(h) \\ _Felix Fröhlich_, Jan 14 2019
%o A064169 (Magma) [Numerator(a)-Denominator(a) where a is HarmonicNumber(n): n in [1..35]]; // _Marius A. Burtea_, Aug 03 2019
%o A064169 (Sage) [numerator(harmonic_number(n)) - denominator(harmonic_number(n)) for n in (1..35)] # _G. C. Greubel_, Jul 27 2019
%o A064169 (GAP) List([1..35], n-> NumeratorRat(Sum([0..n-2], k-> 2/(k+2))) ); # _G. C. Greubel_, Jul 27 2019
%o A064169 (Python)
%o A064169 from sympy import harmonic
%o A064169 def A064169(n): return (lambda x: x.p - x.q)(harmonic(n)) # _Chai Wah Wu_, Sep 27 2021
%Y A064169 Cf. A001008, A002805, A064167, A064168.
%K A064169 nonn
%O A064169 1,3
%A A064169 _Leroy Quet_, Sep 19 2001
%E A064169 One more term from _Robert G. Wilson v_, Sep 28 2001
%E A064169 More terms from _Vladeta Jovovic_, Aug 12 2002