OFFSET
2,1
COMMENTS
a(n) mod n^3 = 0 iff n is prime > 3. - Gary Detlefs, Jan 30 2013
LINKS
Michael S. Branicky, Table of n, a(n) for n = 2..1001
FORMULA
a(n) = denominator(H(n)/H(n-1)), where H(n) = Sum_{k=1..n} 1/k.
a(n) = numerator(n*H(n))-denominator(n*H(n)). - Gary Detlefs, Sep 05 2011
MAPLE
H:= n-> add(1/k, k=1..n): seq(denom(H(n)/H(n-1)), n=2..25);
MATHEMATICA
h[n_] := Sum[1/i, {i, n}]; Table[Denominator[h[n]/h[n - 1]], {n, 2, 50}] (* T. D. Noe, Aug 04 2011 *)
Denominator[#[[2]]/#[[1]]]&/@Partition[HarmonicNumber[Range[30]], 2, 1] (* Harvey P. Dale, Jul 05 2015 *)
PROG
(Python)
from fractions import Fraction
def aupton(nn):
Hnm1, alst = Fraction(1, 1), []
for n in range(2, nn+1):
Hn = Hnm1 + Fraction(1, n)
alst.append((Hn/Hnm1).denominator)
Hnm1 = Hn
return alst
print(aupton(30)) # Michael S. Branicky, Feb 09 2021
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Gary Detlefs, Aug 04 2011
STATUS
approved