login
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

%I #16 Jul 23 2017 22:07:39

%S 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,

%T 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,

%U 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

%N 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.

%C For values of n such that a(n) = n, see A113570; this begins: 1, 2, 4, 8, 9, 16, 27, 32, 64, 81, ...

%C Conjecture: a(n) <= n for all positive n's.

%H Michel Marcus, <a href="/A110545/b110545.txt">Table of n, a(n) for n = 1..1000</a>

%e a(5) = 4 because H(4) = 25/12 is the first harmonic number with either its numerator or denominator divisible by 5.

%e a(6) = 3 because H(3) = 11/6 is the first harmonic number with either its numerator or denominator divisible by 6.

%t 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 *)

%o (PARI) isok(h, n) = ((numerator(h) % n) == 0) || ((denominator(h) % n) == 0);

%o h(n) = sum(k=1, n, 1/k);

%o a(n) = {my(k = 1); while(! isok(h(k), n), k++); k;} \\ _Michel Marcus_, Jul 23 2017

%Y Cf. A001008, A002805, A113570.

%K nonn

%O 1,2

%A _Leroy Quet_, Sep 11 2005

%E More terms from _Robert G. Wilson v_, Sep 28 2005