A242222
Number of primes p <= (prime(n)+1)/2 such that the harmonic number H(p-1) = sum_{0
0, 0, 0, 1, 1, 1, 3, 1, 1, 1, 2, 3, 4, 4, 5, 6, 3, 2, 3, 2, 3, 2, 6, 6, 4, 6, 4, 8, 7, 9, 5, 7, 11, 5, 11, 5, 6, 6, 11, 8, 12, 7, 8, 9, 8, 11, 7, 13, 18, 8, 18, 14, 8, 9, 14, 18, 17, 7, 14, 11, 9, 19, 10, 12, 7, 21, 5, 15, 19, 15
Offset: 1
Keywords
A242241 Least prime p such that H(2,n) = sum_{k=1..n}1/k^2 == 0 (mod p) but there is no 0 < k < n with H(2,k) == 0 (mod p), or 1 if such a prime p does not exist.
1, 5, 7, 41, 11, 13, 266681, 17, 19, 178939, 23, 18500393, 40799043101, 29, 31, 619, 601, 8821, 86364397717734821, 421950627598601, 2621, 295831, 47, 2237, 157, 53, 307, 7741, 6823, 61, 205883, 487, 67, 21767149, 71, 73, 149, 2004383, 79, 34033
Offset: 1
Keywords
Comments
Examples
a(4) = 41 since H(2,4) = 5*41/(2^4*3^2) but none of H(2,1) = 1, H(2,2) = 5/2^2 and H(2,3) = 7^2/(2^2*3^2) is congruent to 0 modulo 41.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..108
- Zhi-Wei Sun, Notes on primitive roots modulo primes, arXiv:1405.0290 [math.NT], 2014.
Programs
-
Mathematica
h[n_]:=Numerator[HarmonicNumber[n,2]] f[n_]:=FactorInteger[h[n]] p[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}]
Comments
Examples
Links
Crossrefs
Programs
Mathematica