login
A110545
a(n) is smallest positive integer m such that n divides either the numerator or the denominator of the (reduced) fraction H(m) = Sum_{k=1..m} 1/k.
3
1, 2, 2, 4, 4, 3, 6, 8, 9, 5, 3, 4, 12, 7, 5, 16, 16, 9, 18, 5, 9, 11, 22, 9, 4, 13, 27, 7, 13, 5, 30, 32, 7, 17, 7, 9, 17, 19, 13, 8, 40, 9, 13, 11, 9, 23, 46, 16, 6, 25, 17, 13, 22, 27, 11, 8, 19, 29, 58, 5, 10, 31, 9, 64, 13, 11, 66, 17, 22, 7, 70, 9, 72, 37, 25, 19, 11, 13, 78, 16, 81
OFFSET
1,2
COMMENTS
For values of n such that a(n) = n, see A113570; this begins: 1, 2, 4, 8, 9, 16, 27, 32, 64, 81, ...
Conjecture: a(n) <= n for all positive n's.
LINKS
EXAMPLE
a(5) = 4 because H(4) = 25/12 is the first harmonic number with either its numerator or denominator divisible by 5.
a(6) = 3 because H(3) = 11/6 is the first harmonic number with either its numerator or denominator divisible by 6.
MATHEMATICA
f[n_] := Block[{h = k = 1}, While[ !IntegerQ[ Numerator[h]/n] && !IntegerQ[ Denominator[h]/n], k++; h = h + 1/k]; k]; Table[ f[n], {n, 81}] (* Robert G. Wilson v, Sep 28 2005 *)
PROG
(PARI) isok(h, n) = ((numerator(h) % n) == 0) || ((denominator(h) % n) == 0);
h(n) = sum(k=1, n, 1/k);
a(n) = {my(k = 1); while(! isok(h(k), n), k++); k; } \\ Michel Marcus, Jul 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 11 2005
EXTENSIONS
More terms from Robert G. Wilson v, Sep 28 2005
STATUS
approved