OFFSET
1,3
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Book Stacking Problem.
FORMULA
a(n) = numerator(frac(Sum_{k=1..n} 1/k)). [edited by Michel Marcus, Sep 27 2021]
MATHEMATICA
h[n_] := Sum[1/k, {k, 1, n}]
Table[Numerator[FractionalPart[h[n]]], {n, 1, 30}]
(* Clark Kimberling, Aug 13 2012 *)
FractionalPart[HarmonicNumber[Range[30]]]//Numerator (* Harvey P. Dale, Jul 28 2019 *)
PROG
(Python)
from sympy import harmonic
def A104174(n): return (lambda x: x.p % x.q)(harmonic(n)) # Chai Wah Wu, Sep 26 2021
(PARI) a(n) = numerator(frac(sum(k=1, n, 1/k))); \\ Michel Marcus, Sep 27 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Georg Haass (geha5001(AT)stud.uni-saarland.de), Mar 10 2005
STATUS
approved