login
A242223
Least prime p such that H(n) == 0 (mod p) but H(k) == 0 (mod p) for no 0 < k < n, or 1 if such a prime p does not exist, where H(n) denotes the n-th harmonic number sum_{k=1..n}1/k.
3
1, 3, 11, 5, 137, 7, 1, 761, 7129, 61, 97, 13, 29, 1049, 41233, 17, 37, 19, 7440427, 11167027, 18858053, 23, 583859, 577, 109, 34395742267, 521, 375035183, 4990290163, 31, 2667653736673, 2917, 269, 3583, 397, 1297, 10839223, 199, 737281, 41
OFFSET
1,2
COMMENTS
Conjecture: a(n) is prime except for n = 1, 7.
LINKS
Z.-W. Sun, New observations on primitive roots modulo primes, arXiv preprint arXiv:1405.0290 [math.NT], 2014.
EXAMPLE
a(4) = 5 since H(4) = 25/12 == 0 (mod 5), but none of H(1) = 1, H(2) = 3/2 and H(3) = 11/6 is congruent to 0 modulo 5.
MATHEMATICA
h[n_]:=Numerator[HarmonicNumber[n]]
f[n_]:=FactorInteger[h[n]]
p[n_]:=Table[Part[Part[f[n], k], 1], {k, 1, Length[f[n]]}]
Do[If[h[n]<2, Goto[cc]]; Do[Do[If[Mod[h[i], Part[p[n], k]]==0, Goto[aa]], {i, 1, n-1}]; Print[n, " ", Part[p[n], k]]; Goto[bb]; Label[aa]; Continue, {k, 1, Length[p[n]]}]; Label[cc]; Print[n, " ", 1]; Label[bb]; Continue, {n, 1, 40}]
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 08 2014
STATUS
approved