A109628 Numbers k such that the numerator of Sum_{i=1..k} 1/prime(i), in reduced form, is prime.
2, 3, 5, 6, 18, 19, 22, 47, 57, 58, 63, 70, 73, 112, 632, 1382, 4621
Offset: 1
Examples
Sum_{i=1..6} 1/prime(i) = 40361/30030 and 40361 is prime, hence 6 is a term.
Programs
-
Mathematica
s = 0; Do[s += 1/Prime[n]; k = Numerator[s]; If[PrimeQ[k], Print[n]], {n, 1, 1500}] Position[Accumulate[1/Prime[Range[120]]],?(PrimeQ[ Numerator[ #]]&)] //Flatten (* To generate terms greater than 120, increase the Range constant, but the program may take much longer to run. *) (* _Harvey P. Dale, Jan 01 2019 *)
Extensions
a(17) from Michael S. Branicky, Sep 16 2024
Comments